mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
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.
This commit is contained in:
26
migrations/versions/0319_contact_list_archived.py
Normal file
26
migrations/versions/0319_contact_list_archived.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
|
||||
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',
|
||||
)
|
||||
Reference in New Issue
Block a user