Files
notifications-api/migrations/versions/0301_upload_letters_permission.py
Katie Smith b31e431d4e Rename migration file to match migration revision ID
Because these were slightly different, the `check_if_new_migration`
script would always think there was a new migration to run and so we
were always testing the db migrations when deploying.
2019-08-09 12:41:19 +01:00

23 lines
548 B
Python

"""
Revision ID: 0301_upload_letters_permission
Revises: 0300_migrate_org_types
Create Date: 2019-08-05 10:49:27.467361
"""
from alembic import op
import sqlalchemy as sa
revision = '0301_upload_letters_permission'
down_revision = '0300_migrate_org_types'
def upgrade():
op.execute("INSERT INTO service_permission_types VALUES ('upload_letters')")
def downgrade():
op.execute("DELETE FROM service_permissions WHERE permission = 'upload_letters'")
op.execute("DELETE FROM service_permission_types WHERE name = 'upload_letters'")