Files
notifications-api/migrations/versions/0017_emailfrom_notnull.py
Martyn Inglis f8ac14ea30 Update model
- adds email_from field to the service model
- adds subject_line to the template model

These are unique and not null fields, so there is a migration here for email_from to populate it.
2016-02-19 15:52:19 +00:00

27 lines
581 B
Python

"""empty message
Revision ID: 0017_emailfrom_notnull
Revises: 0016_add_email_from
Create Date: 2016-02-18 11:41:25.753694
"""
# revision identifiers, used by Alembic.
revision = '0017_emailfrom_notnull'
down_revision = '0016_add_email_from'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.alter_column('services', 'email_from',
existing_type=sa.TEXT(),
nullable=False)
def downgrade():
op.alter_column('services', 'email_from',
existing_type=sa.TEXT(),
nullable=True)