We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given the following revision script:
from alembic import op import sqlalchemy as sa revision = "bug_demo" down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table("foo", sa.Column("col1", sa.Integer, sa.CheckConstraint("col1>0"))) op.add_column("foo", sa.Column("col2", sa.Integer, sa.CheckConstraint("col2>0"))) def downgrade(): pass
The command alembic upgrade --sql bug_demo produces:
alembic upgrade --sql bug_demo
... CREATE TABLE foo ( col1 INTEGER CHECK (col1>0) ); ALTER TABLE foo ADD COLUMN col2 INTEGER; ...
col1 has the check constraint applied, but col2 does not.
col1
col2
The text was updated successfully, but these errors were encountered:
Mike Bayer has proposed a fix for this issue in the master branch:
Render inline constraints for add_column https://gerrit.sqlalchemy.org/1710
Sorry, something went wrong.
thanks for reporting!
7f8434c
No branches or pull requests
Given the following revision script:
The command
alembic upgrade --sql bug_demo
produces:col1
has the check constraint applied, butcol2
does not.The text was updated successfully, but these errors were encountered: