add letter_contact_block text field to service

This commit is contained in:
Leo Hemsted
2017-02-28 11:28:39 +00:00
parent 1e2432ac06
commit f5511a19a2
2 changed files with 29 additions and 0 deletions

View File

@@ -143,6 +143,7 @@ class Service(db.Model, Versioned):
created_by = db.relationship('User')
created_by_id = db.Column(UUID(as_uuid=True), db.ForeignKey('users.id'), index=True, nullable=False)
reply_to_email_address = db.Column(db.Text, index=False, unique=False, nullable=True)
letter_contact_block = db.Column(db.Text, index=False, unique=False, nullable=True)
sms_sender = db.Column(db.String(11), nullable=True)
organisation_id = db.Column(UUID(as_uuid=True), db.ForeignKey('organisation.id'), index=True, nullable=True)
organisation = db.relationship('Organisation')

View File

@@ -0,0 +1,28 @@
"""empty message
Revision ID: 0067_service_contact_block
Revises: 0066_add_dvla_provider
Create Date: 2017-02-28 11:23:40.299110
"""
# revision identifiers, used by Alembic.
revision = '0067_service_contact_block'
down_revision = '0066_add_dvla_provider'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.add_column('services', sa.Column('letter_contact_block', sa.Text(), nullable=True))
op.add_column('services_history', sa.Column('letter_contact_block', sa.Text(), nullable=True))
### end Alembic commands ###
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_column('services_history', 'letter_contact_block')
op.drop_column('services', 'letter_contact_block')
### end Alembic commands ###