zalupka
This commit is contained in:
@@ -29,6 +29,10 @@ target_metadata = BaseModel.metadata
|
||||
# can be acquired:
|
||||
# my_important_option = config.get_main_option("my_important_option")
|
||||
# ... etc.
|
||||
def include_object(object, name, type_, reflected, compare_to):
|
||||
print(f"{type_}: {name}")
|
||||
return True # Temporarily return True to debug all objects
|
||||
|
||||
|
||||
def get_url():
|
||||
url = config.get_main_option("sqlalchemy.url").format(
|
||||
@@ -65,7 +69,11 @@ def run_migrations_offline() -> None:
|
||||
|
||||
|
||||
def do_run_migrations(connection: Connection) -> None:
|
||||
context.configure(connection=connection, target_metadata=target_metadata)
|
||||
context.configure(connection=connection,
|
||||
target_metadata=target_metadata,
|
||||
include_schemas=True,
|
||||
include_object=include_object,
|
||||
)
|
||||
with context.begin_transaction():
|
||||
context.run_migrations()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user