mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Add is_active column for the 3 reply_to tables
Added a new boolean column, `is_active` to these tables * service_email_reply_to * service_sms_senders * service_letter_contacts This has a database default of True in order to backfill the data, but this default will be replaced with a model default later.
This commit is contained in:
25
migrations/versions/0185_add_is_active_to_reply_tos.py
Normal file
25
migrations/versions/0185_add_is_active_to_reply_tos.py
Normal 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')
|
||||
Reference in New Issue
Block a user