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:
Martyn Inglis
2016-02-19 15:52:19 +00:00
parent 13b7a89c8c
commit f8ac14ea30
6 changed files with 122 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
"""empty message
Revision ID: 0018_unique_emailfrom
Revises: 0017_emailfrom_notnull
Create Date: 2016-02-18 11:42:18.246280
"""
# revision identifiers, used by Alembic.
revision = '0018_unique_emailfrom'
down_revision = '0017_emailfrom_notnull'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_unique_constraint(None, 'services', ['email_from'])
def downgrade():
op.drop_constraint(None, 'services', type_='unique')