Alembic Primary Key issue with mssql ( Azure Synapse SQL DW ) #939
-
Describe the bug
Expected behavior To Reproduce
Error
Versions.
Additional context Have a nice day! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I tried adding the config |
Beta Was this translation helpful? Give feedback.
-
I was able to suppress the creation of the primary key on the alembic_version table by doing the following: Edit env.py and add the with connectable.connect() as connection:
context.configure(
connection=connection, target_metadata=target_metadata
) … becomes this with connectable.connect() as connection:
context.configure(
connection=connection, target_metadata=target_metadata,
version_table_pk=False
) |
Beta Was this translation helpful? Give feedback.
I was able to suppress the creation of the primary key on the alembic_version table by doing the following:
Edit env.py and add the
version_table_pk=False
option to thecontext.configure()
call in therun_migrations_online()
function. That is, this …… becomes this