mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-13 20:48:42 -04:00
Merge pull request #1895 from alphagov/rc_add_service_contact_link_to_db
Added Service contact_link column
This commit is contained in:
@@ -342,6 +342,7 @@ class Service(db.Model, Versioned):
|
||||
)
|
||||
crown = db.Column(db.Boolean, index=False, nullable=False, default=True)
|
||||
rate_limit = db.Column(db.Integer, index=False, nullable=False, default=3000)
|
||||
contact_link = db.Column(db.String(255), nullable=True, unique=False)
|
||||
|
||||
organisation = db.relationship(
|
||||
'Organisation',
|
||||
|
||||
23
migrations/versions/0197_service_contact_link.py
Normal file
23
migrations/versions/0197_service_contact_link.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0197_service_contact_link
|
||||
Revises: 0196_complaints_table
|
||||
Create Date: 2018-05-31 15:01:32.977620
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '0197_service_contact_link'
|
||||
down_revision = '0196_complaints_table'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('services', sa.Column('contact_link', sa.String(length=255), nullable=True))
|
||||
op.add_column('services_history', sa.Column('contact_link', sa.String(length=255), nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('services_history', 'contact_link')
|
||||
op.drop_column('services', 'contact_link')
|
||||
Reference in New Issue
Block a user