-
-
Notifications
You must be signed in to change notification settings - Fork 321
Closed
Labels
Description
Describe the bug
Running alembic check in an environment based on the multidb template results in an error.
Expected behavior
It should report on migrations needed for each database.
To Reproduce
Bootstrap a new environment using the multidb template and wire up two databases. Then run alembic check against the environment.
Error
$ alembic --version
alembic 1.10.4
$ alembic check
INFO [alembic.env] Migrating database user_db
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.env] Migrating database loadshape_db
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
Traceback (most recent call last):
File "/src/.venv/bin/alembic", line 8, in <module>
sys.exit(main())
^^^^^^
File "/src/.venv/lib/python3.11/site-packages/alembic/config.py", line 591, in main
CommandLine(prog=prog).main(argv=argv)
File "/src/.venv/lib/python3.11/site-packages/alembic/config.py", line 585, in main
self.run_cmd(cfg, options)
File "/src/.venv/lib/python3.11/site-packages/alembic/config.py", line 562, in run_cmd
fn(
File "/src/.venv/lib/python3.11/site-packages/alembic/command.py", line 290, in check
diffs = migration_script.upgrade_ops.as_diffs()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/.venv/lib/python3.11/site-packages/alembic/operations/ops.py", line 2569, in upgrade_ops
raise ValueError(
ValueError: This MigrationScript instance has a multiple-entry list for UpgradeOps; please use the upgrade_ops_list attribute.
Versions.
- OS: Linux
- Python: 3.11.2
- Alembic: 1.10.4
- SQLAlchemy: 2.0.12
- Database: PostgreSQL 15
- DBAPI: Psycopg2 or asyncpg
Have a nice day!
Reactions are currently unavailable