This commit is contained in:
Kenneth Kehl
2023-08-29 14:54:30 -07:00
parent 19dcd7a48b
commit 1ecb747c6d
588 changed files with 34091 additions and 23580 deletions
+10 -8
View File
@@ -9,12 +9,12 @@ from alembic import op
import sqlalchemy as sa
import os
revision = '0331_add_broadcast_org'
down_revision = '0330_broadcast_invite_email'
revision = "0331_add_broadcast_org"
down_revision = "0330_broadcast_invite_email"
environment = os.environ['NOTIFY_ENVIRONMENT']
environment = os.environ["NOTIFY_ENVIRONMENT"]
organisation_id = '38e4bf69-93b0-445d-acee-53ea53fe02df'
organisation_id = "38e4bf69-93b0-445d-acee-53ea53fe02df"
def upgrade():
@@ -54,15 +54,15 @@ def upgrade():
conn.execute(
sa.text(insert_sql),
id=organisation_id,
name=f'Broadcast Services ({environment})',
name=f"Broadcast Services ({environment})",
active=True,
agreement_signed=None,
crown=None,
organisation_type='central',
organisation_type="central",
)
conn.execute(
sa.text(update_service_set_broadcast_org_sql),
organisation_id=organisation_id
organisation_id=organisation_id,
)
@@ -77,5 +77,7 @@ def downgrade():
WHERE id = :organisation_id
"""
conn = op.get_bind()
conn.execute(sa.text(update_service_remove_org_sql), organisation_id=organisation_id)
conn.execute(
sa.text(update_service_remove_org_sql), organisation_id=organisation_id
)
conn.execute(sa.text(delete_sql), organisation_id=organisation_id)