get DB_URL from go-ji
change
commit 318fb89c77cd508eca403dbeab9471d54b91ed86
author Alpha Chen <alpha@kejadlen.dev>
date
parent 499c3e7e
diff --git a/alembic/env.py b/alembic/env.py
index 2c3b2ae..206f8c2 100644
--- a/alembic/env.py
+++ b/alembic/env.py
@@ -13,8 +13,10 @@ config = context.config
 if config.config_file_name is not None:
     fileConfig(config.config_file_name)
 
+from go_ji import create_app  # noqa: E402
 from go_ji.db import Base  # noqa: E402
 
+config.set_main_option("sqlalchemy.url", create_app().config["DB_URL"])
 target_metadata = Base.metadata
 
 # other values from the config, defined by the needs of env.py,