Merge pull request #3052 from coreos-inc/joseph.schorr/QUAY-912/fix-postgres-migration

Postgres requires defaults for non-nullable cols, even integer ones
This commit is contained in:
josephschorr 2018-04-09 10:23:46 -04:00 committed by GitHub
commit 916441b5f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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(