Skip to content

Commit

Permalink
Add alembic.ini (pypi#10053)
Browse files Browse the repository at this point in the history
The `url` setting was unused - it should be `sqlalchemy.url`, and
the DB is set up in `env.py`.
  • Loading branch information
abitrolly committed Oct 7, 2021
1 parent de4a2e5 commit 3dae086
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions warehouse/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +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.set_main_option("url", config.registry.settings["database.url"])
alembic_cfg = alembic.config.Config("warehouse/migrations/alembic.ini")
return alembic_cfg


Expand Down
2 changes: 2 additions & 0 deletions warehouse/migrations/alembic.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alembic]
script_location = warehouse:migrations

0 comments on commit 3dae086

Please sign in to comment.