Sql Server default constraints have generated names #1414
Unanswered
marshall62
asked this question in
Usage Questions
Replies: 1 comment
-
use mssql_drop_default for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The use of server_default results in a generated constraint in Sql Server.
op.add_column("OrderTable", sa.Column("item_counter", sa.Integer(), nullable=False, server_default="0"))
A constraint like df_OrderTable_item_cou__5A843B7E3. is generated when alembic upgrade is run.
At present, there is no way to gain control over the name of the constraint. This means that the downgrade function fails
because there is no way to add a command to delete the constraint.
Beta Was this translation helpful? Give feedback.
All reactions