Also prefix the alembic_version table
We need to prefix all tables if we configured a prefix. That includes the alembic version table. Change-Id: Ie80544cca8aeb6c8bc66e1eea7722b4a8ed7f8dc
This commit is contained in:
parent
e042e4f735
commit
56fc36dd60
@ -0,0 +1,9 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The alembic version table is fixed to being prefixed too. This is necessary
|
||||
when using :attr:`<sql connection>.table_prefix`. However if you are
|
||||
already using ``table_prefix`` you will need to rename the table
|
||||
``alembic_version`` to ``<prefix>alembic_version`` before starting Zuul.
|
||||
Otherwise zuul will try to create the tables again and fail. If you're not
|
||||
using ``table_prefix`` you can safely ignore this.
|
@ -65,7 +65,8 @@ def run_migrations_online():
|
||||
with connectable.connect() as connection:
|
||||
context.configure(
|
||||
connection=connection,
|
||||
target_metadata=target_metadata
|
||||
target_metadata=target_metadata,
|
||||
version_table=table_prefix + 'alembic_version'
|
||||
)
|
||||
|
||||
with context.begin_transaction():
|
||||
|
Loading…
x
Reference in New Issue
Block a user