mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 08:51:30 -05:00
- 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.
24 lines
506 B
Python
24 lines
506 B
Python
"""empty message
|
|
|
|
Revision ID: 0016_add_email_from
|
|
Revises: 0015_add_subject_line
|
|
Create Date: 2016-02-18 11:25:37.915137
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '0016_add_email_from'
|
|
down_revision = '0015_add_subject_line'
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
def upgrade():
|
|
op.add_column('services', sa.Column('email_from', sa.Text(), nullable=True))
|
|
op.execute("UPDATE services SET email_from=name")
|
|
|
|
|
|
def downgrade():
|
|
op.drop_column('services', 'email_from')
|