mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 05:58:53 -04:00
Add columns for requested and allowed broadcast areas for a service
We want to restrict where broadcast services can broadcast to. Hence we are creating columns on service_broadcast_settings table to store the lists of allowed_broadcast_areas and requested_allowed_broadcast_areas.
This commit is contained in:
31
migrations/versions/0351_allowed_broadcast_areas.py
Normal file
31
migrations/versions/0351_allowed_broadcast_areas.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""
|
||||
|
||||
Revision ID: 0351_allowed_broadcast_areas
|
||||
Revises: 0350_update_rates
|
||||
Create Date: 2021-04-09 12:51:17.158043
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
revision = '0351_allowed_broadcast_areas'
|
||||
down_revision = '0350_update_rates'
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('service_broadcast_settings', sa.Column(
|
||||
'allowed_broadcast_areas', postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), nullable=True)
|
||||
)
|
||||
op.add_column('service_broadcast_settings', sa.Column(
|
||||
'requested_allowed_broadcast_areas', postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), nullable=True)
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('service_broadcast_settings', 'requested_allowed_broadcast_areas')
|
||||
op.drop_column('service_broadcast_settings', 'allowed_broadcast_areas')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user