Files
notifications-api/migrations/versions/0344_stubbed_not_nullable.py

31 lines
796 B
Python
Raw Normal View History

"""
Revision ID: 0344_stubbed_not_nullable
Revises: 0343_org_billing_details
Create Date: 2021-02-08 18:10:15.533279
"""
2024-04-01 15:12:33 -07:00
import sqlalchemy as sa
from alembic import op
2023-08-29 14:54:30 -07:00
revision = "0344_stubbed_not_nullable"
down_revision = "0343_org_billing_details"
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.execute("UPDATE broadcast_message SET stubbed = False WHERE stubbed is null")
op.alter_column(
2023-08-29 14:54:30 -07:00
"broadcast_message", "stubbed", existing_type=sa.BOOLEAN(), nullable=False
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
2023-08-29 14:54:30 -07:00
"broadcast_message", "stubbed", existing_type=sa.BOOLEAN(), nullable=True
)
# ### end Alembic commands ###