MCPcopy Create free account
hub / github.com/dataease/SQLBot / run_migrations_offline

Function run_migrations_offline

backend/alembic/env.py:48–66  ·  view source on GitHub ↗

Run migrations in 'offline' mode. This configures the context with just a URL and not an Engine, though an Engine is acceptable here as well. By skipping the Engine creation we don't even need a DBAPI to be available. Calls to context.execute() here emit the given string to th

()

Source from the content-addressed store, hash-verified

46
47
48def run_migrations_offline():
49 """Run migrations in 'offline' mode.
50
51 This configures the context with just a URL
52 and not an Engine, though an Engine is acceptable
53 here as well. By skipping the Engine creation
54 we don't even need a DBAPI to be available.
55
56 Calls to context.execute() here emit the given string to the
57 script output.
58
59 """
60 url = get_url()
61 context.configure(
62 url=url, target_metadata=target_metadata, literal_binds=True, compare_type=True
63 )
64
65 with context.begin_transaction():
66 context.run_migrations()
67
68
69def run_migrations_online():

Callers 1

env.pyFile · 0.85

Calls 1

get_urlFunction · 0.85

Tested by

no test coverage detected