Updated file
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
|
import sys
|
||||||
from logging.config import fileConfig
|
from logging.config import fileConfig
|
||||||
|
|
||||||
from sqlalchemy import engine_from_config, pool
|
from sqlalchemy import engine_from_config, pool
|
||||||
@@ -75,7 +76,12 @@ async def run_migrations_online() -> None:
|
|||||||
async with connectable.connect() as connection:
|
async with connectable.connect() as connection:
|
||||||
await connection.run_sync(do_run_migrations)
|
await connection.run_sync(do_run_migrations)
|
||||||
|
|
||||||
if context.is_offline_mode():
|
def main() -> None:
|
||||||
asyncio.run(run_migrations_offline())
|
if context.is_offline_mode():
|
||||||
else:
|
asyncio.run(run_migrations_offline())
|
||||||
asyncio.run(run_migrations_online())
|
else:
|
||||||
|
asyncio.run(run_migrations_online())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
Reference in New Issue
Block a user