Postgres requires defaults for non-nullable cols, even integer ones

Fixes https://jira.coreos.com/browse/QUAY-912
This commit is contained in:
Joseph Schorr 2018-04-08 18:54:23 -04:00
parent ecf6db256d
commit 4418772745

View file

@ -16,8 +16,8 @@ from sqlalchemy.dialects import mysql
def upgrade(tables):
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('repositorybuildtrigger', sa.Column('successive_failure_count', sa.Integer(), nullable=False))
op.add_column('repositorybuildtrigger', sa.Column('successive_internal_error_count', sa.Integer(), nullable=False))
op.add_column('repositorybuildtrigger', sa.Column('successive_failure_count', sa.Integer(), server_default='0', nullable=False))
op.add_column('repositorybuildtrigger', sa.Column('successive_internal_error_count', sa.Integer(), server_default='0', nullable=False))
# ### end Alembic commands ###
op.bulk_insert(