Files
notifications-api/migrations/versions/0219_default_email_branding.py

36 lines
645 B
Python
Raw Normal View History

"""
Revision ID: 0219_default_email_branding
2023-07-26 15:51:50 -07:00
Revises: 0216_remove_colours
Create Date: 2018-08-24 13:36:49.346156
"""
2024-04-01 15:12:33 -07:00
from alembic import op
2023-07-17 13:16:50 -07:00
from sqlalchemy import text
from app.enums import BrandType
2023-08-29 14:54:30 -07:00
revision = "0219_default_email_branding"
down_revision = "0216_remove_colours"
def upgrade():
2023-07-17 13:16:50 -07:00
conn = op.get_bind()
input_params = {"branding_org": BrandType.ORG.value}
2023-08-29 14:54:30 -07:00
conn.execute(
text(
"""
update
email_branding
set
2023-07-17 13:16:50 -07:00
brand_type = :branding_org
where
brand_type is null
2023-08-29 14:54:30 -07:00
"""
),
input_params,
)
def downgrade():
pass