mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -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:
22
migrations/versions/0019_unique_servicename.py
Normal file
22
migrations/versions/0019_unique_servicename.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0019_unique_servicename
|
||||
Revises: 0018_unique_emailfrom
|
||||
Create Date: 2016-02-18 11:45:29.102891
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0019_unique_servicename'
|
||||
down_revision = '0018_unique_emailfrom'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_unique_constraint(None, 'services', ['name'])
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_constraint(None, 'services', type_='unique')
|
||||
Reference in New Issue
Block a user