How to run alembic check
in a read-only database
#1668
-
I have a read-only database. I use alembic to check if my SQLAlchemy model definition matches the database table schema. Howerer, running |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi, The check commands uses the autogenerate features, that in general will query the alembic_version table to setup the environment and check that all available migrations are applied in the db before performing a check. What's your use care for wanting to use alembic but not having the alembic_version table in the db? |
Beta Was this translation helpful? Give feedback.
-
Alembic's API can be used to run a metadata / reflection comparison , a complete example is at https://alembic.sqlalchemy.org/en/latest/api/autogenerate.html#alembic.autogenerate.compare_metadata |
Beta Was this translation helpful? Give feedback.
Alembic's API can be used to run a metadata / reflection comparison , a complete example is at https://alembic.sqlalchemy.org/en/latest/api/autogenerate.html#alembic.autogenerate.compare_metadata