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