mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
Store organisation type against each service
> So that we can default services to their appropriate text allowance, > we need to find out what sector they're in. So let's start collecting > that from teams as they create new services. In order to work out what a team’s allowance should be, we need to know what part of government they’re from. We’re going to do this logic in the admin app and then `POST` the allowance to the API. So all we need to do with the information that the users give us is store it against the service, so we have a record. Doesn’t need any logic doing as a result of it, doesn’t need foreign keying to the organisations table, etc.
This commit is contained in:
23
migrations/versions/0125_add_organisation_type.py
Normal file
23
migrations/versions/0125_add_organisation_type.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0125_add_organisation_type
|
||||
Revises: 0124_add_free_sms_fragment_limit
|
||||
Create Date: 2017-10-05 14:03:00.248005
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '0125_add_organisation_type'
|
||||
down_revision = '0124_add_free_sms_fragment_limit'
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.add_column('services', sa.Column('organisation_type', sa.String(length=255), nullable=True))
|
||||
op.add_column('services_history', sa.Column('organisation_type', sa.String(length=255), nullable=True))
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_column('services', 'organisation_type')
|
||||
op.drop_column('services_history', 'organisation_type')
|
||||
Reference in New Issue
Block a user