Files
notifications-api/migrations/versions/0319_contact_list_archived.py
Chris Hill-Scott 5fe0fafadf Archive, don’t delete contact lists
So we keep a record of who first uploaded a list it’s better to archive
a list than completely delete it.

The list in the database doesn’t contain any recipient info so this
isn’t a change to what data we’re retaining.

This means updating the endpoints that get contact lists to exclude ones
that are archived.
2020-03-27 09:51:54 +00:00

27 lines
516 B
Python

"""
Revision ID: 0319_contact_list_archived
Revises: 0318_service_contact_list
Create Date: 2020-03-26 11:16:12.389524
"""
from alembic import op
import sqlalchemy as sa
revision = '0319_contact_list_archived'
down_revision = '0318_service_contact_list'
def upgrade():
op.add_column(
'service_contact_list',
sa.Column('archived', sa.Boolean(), nullable=False, server_default=sa.false()),
)
def downgrade():
op.drop_column(
'service_contact_list',
'archived',
)