mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-11 07:42:20 -05:00
In future changes, services will be able to control whether their text messages will be prefixed with the name of their service. This commit: - adds a column to store the value of that setting - makes the service model take notice of it, if it were to have a value set It doesn’t: - provide a way of setting the value of this column Currently the column can have three values: - `None` – ignore it (this is what all current services will start as) and continue to determine whether to prefix messages by looking at the sender - `True` – always the service name to the start of text messages - `False` – never add the service name to the start of text messages In the future we’ll migrate all services to be either `True` or `False`, the `None` will go away and all services will have direct control over the setting.
24 lines
602 B
Python
24 lines
602 B
Python
"""
|
|
|
|
Revision ID: 0132_add_sms_prefix_setting
|
|
Revises: 0131_user_auth_types
|
|
Create Date: 2017-11-03 11:07:40.537006
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
revision = '0132_add_sms_prefix_setting'
|
|
down_revision = '0131_user_auth_types'
|
|
|
|
|
|
def upgrade():
|
|
op.add_column('services', sa.Column('prefix_sms', sa.Boolean(), nullable=True))
|
|
op.add_column('services_history', sa.Column('prefix_sms', sa.Boolean(), nullable=True))
|
|
|
|
|
|
def downgrade():
|
|
op.drop_column('services_history', 'prefix_sms')
|
|
op.drop_column('services', 'prefix_sms')
|