2021-06-09 13:48:02 +01:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
Revision ID: 0358_operator_channel
|
|
|
|
|
Revises: 0357_validate_constraint
|
|
|
|
|
Create Date: 2021-06-09 13:44:12.479191
|
|
|
|
|
|
|
|
|
|
"""
|
2024-04-01 15:12:33 -07:00
|
|
|
|
2021-06-09 13:48:02 +01:00
|
|
|
from alembic import op
|
|
|
|
|
|
2023-08-29 14:54:30 -07:00
|
|
|
revision = "0358_operator_channel"
|
|
|
|
|
down_revision = "0357_validate_constraint"
|
2021-06-09 13:48:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
|
op.execute("INSERT INTO broadcast_channel_types VALUES ('operator')")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
|
# This can't be downgraded if there are rows in service_broadcast_settings which
|
|
|
|
|
# have the channel set to operator or if broadcasts have already been sent on the
|
|
|
|
|
# operator channel - it would break foreign key constraints.
|
|
|
|
|
op.execute("DELETE FROM broadcast_channel_types WHERE name = 'operator'")
|