diff --git a/warehouse/db.py b/warehouse/db.py index 1ef65c266b96..139ec305d26f 100644 --- a/warehouse/db.py +++ b/warehouse/db.py @@ -131,8 +131,7 @@ def callback(scanner, _name, wrapped): def _configure_alembic(config): - alembic_cfg = alembic.config.Config() - alembic_cfg.set_main_option("script_location", "warehouse:migrations") + alembic_cfg = alembic.config.Config("warehouse/migrations/alembic.ini") alembic_cfg.set_main_option("url", config.registry.settings["database.url"]) return alembic_cfg diff --git a/warehouse/migrations/alembic.ini b/warehouse/migrations/alembic.ini new file mode 100644 index 000000000000..82fc2a4a18ab --- /dev/null +++ b/warehouse/migrations/alembic.ini @@ -0,0 +1,2 @@ +[alembic] +script_location = warehouse:migrations