This commit is contained in:
Kenneth Kehl
2023-08-29 14:54:30 -07:00
parent 19dcd7a48b
commit 1ecb747c6d
588 changed files with 34100 additions and 23589 deletions

View File

@@ -9,47 +9,79 @@ Create Date: 2017-07-10 11:18:27.267721
from alembic import op
from sqlalchemy.dialects import postgresql
revision = '0106_null_noti_status'
down_revision = '0105_opg_letter_org'
revision = "0106_null_noti_status"
down_revision = "0105_opg_letter_org"
def upgrade():
op.alter_column(
'notification_history',
'status',
"notification_history",
"status",
existing_type=postgresql.ENUM(
'created', 'sending', 'delivered', 'pending', 'failed', 'technical-failure',
'temporary-failure', 'permanent-failure', 'sent', name='notify_status_type'
"created",
"sending",
"delivered",
"pending",
"failed",
"technical-failure",
"temporary-failure",
"permanent-failure",
"sent",
name="notify_status_type",
),
nullable=True
nullable=True,
)
op.alter_column(
'notifications',
'status',
"notifications",
"status",
existing_type=postgresql.ENUM(
'created', 'sending', 'delivered', 'pending', 'failed', 'technical-failure',
'temporary-failure', 'permanent-failure', 'sent', name='notify_status_type'
"created",
"sending",
"delivered",
"pending",
"failed",
"technical-failure",
"temporary-failure",
"permanent-failure",
"sent",
name="notify_status_type",
),
nullable=True
nullable=True,
)
def downgrade():
op.alter_column(
'notifications',
'status',
"notifications",
"status",
existing_type=postgresql.ENUM(
'created', 'sending', 'delivered', 'pending', 'failed', 'technical-failure',
'temporary-failure', 'permanent-failure', 'sent', name='notify_status_type'
"created",
"sending",
"delivered",
"pending",
"failed",
"technical-failure",
"temporary-failure",
"permanent-failure",
"sent",
name="notify_status_type",
),
nullable=False
nullable=False,
)
op.alter_column(
'notification_history',
'status',
"notification_history",
"status",
existing_type=postgresql.ENUM(
'created', 'sending', 'delivered', 'pending', 'failed', 'technical-failure',
'temporary-failure', 'permanent-failure', 'sent', name='notify_status_type'
"created",
"sending",
"delivered",
"pending",
"failed",
"technical-failure",
"temporary-failure",
"permanent-failure",
"sent",
name="notify_status_type",
),
nullable=False
nullable=False,
)