From 4db4a4449181e789ef9ec40e4ba5bb882b8e3954 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 2 Mar 2018 13:13:32 -0500 Subject: [PATCH] Add missing server_default on enabled col in repositorybuildtrigger Without it, we'll default all existing triggers to disabled --- .../61cadbacb9fc_add_ability_for_build_triggers_to_be_.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/migrations/versions/61cadbacb9fc_add_ability_for_build_triggers_to_be_.py b/data/migrations/versions/61cadbacb9fc_add_ability_for_build_triggers_to_be_.py index e9e55e716..760414c5f 100644 --- a/data/migrations/versions/61cadbacb9fc_add_ability_for_build_triggers_to_be_.py +++ b/data/migrations/versions/61cadbacb9fc_add_ability_for_build_triggers_to_be_.py @@ -36,7 +36,7 @@ def upgrade(tables): ]) op.add_column(u'repositorybuildtrigger', sa.Column('disabled_reason_id', sa.Integer(), nullable=True)) - op.add_column(u'repositorybuildtrigger', sa.Column('enabled', sa.Boolean(), nullable=False)) + op.add_column(u'repositorybuildtrigger', sa.Column('enabled', sa.Boolean(), nullable=False, server_default=sa.sql.expression.true())) op.create_index('repositorybuildtrigger_disabled_reason_id', 'repositorybuildtrigger', ['disabled_reason_id'], unique=False) op.create_foreign_key(op.f('fk_repositorybuildtrigger_disabled_reason_id_disablereason'), 'repositorybuildtrigger', 'disablereason', ['disabled_reason_id'], ['id']) # ### end Alembic commands ###