From 441877274550945d9320459771c866a5c6750b31 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Sun, 8 Apr 2018 18:54:23 -0400 Subject: [PATCH] Postgres requires defaults for non-nullable cols, even integer ones Fixes https://jira.coreos.com/browse/QUAY-912 --- .../17aff2e1354e_add_automatic_disable_of_build_triggers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/migrations/versions/17aff2e1354e_add_automatic_disable_of_build_triggers.py b/data/migrations/versions/17aff2e1354e_add_automatic_disable_of_build_triggers.py index ca71dd73a..b4c075b96 100644 --- a/data/migrations/versions/17aff2e1354e_add_automatic_disable_of_build_triggers.py +++ b/data/migrations/versions/17aff2e1354e_add_automatic_disable_of_build_triggers.py @@ -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(