Merge pull request #1834 from alphagov/migration-to-add-active-column-to-replyto-tables

Add is_active column for the 3 reply_to tables
This commit is contained in:
Katie Smith
2018-04-23 12:34:05 +01:00
committed by GitHub

View File

@@ -0,0 +1,25 @@
"""
Revision ID: 0185_add_is_active_to_reply_tos
Revises: 0184_alter_primary_key_1
Create Date: 2018-04-10 16:35:41.824981
"""
from alembic import op
import sqlalchemy as sa
revision = '0185_add_is_active_to_reply_tos'
down_revision = '0184_alter_primary_key_1'
def upgrade():
op.add_column('service_email_reply_to', sa.Column('is_active', sa.Boolean(), nullable=False, server_default=sa.true()))
op.add_column('service_letter_contacts', sa.Column('is_active', sa.Boolean(), nullable=False, server_default=sa.true()))
op.add_column('service_sms_senders', sa.Column('is_active', sa.Boolean(), nullable=False, server_default=sa.true()))
def downgrade():
op.drop_column('service_sms_senders', 'is_active')
op.drop_column('service_letter_contacts', 'is_active')
op.drop_column('service_email_reply_to', 'is_active')