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
()
| 46 | |
| 47 | |
| 48 | def 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 | |
| 69 | def run_migrations_online(): |