2018-08-28 17:24:14 +01:00
|
|
|
"""
|
|
|
|
|
Revision ID: 0219_default_email_branding
|
2023-07-26 15:51:50 -07:00
|
|
|
Revises: 0216_remove_colours
|
2018-08-28 17:24:14 +01:00
|
|
|
Create Date: 2018-08-24 13:36:49.346156
|
|
|
|
|
"""
|
|
|
|
|
from alembic import op
|
2023-07-17 13:16:50 -07:00
|
|
|
from sqlalchemy import text
|
|
|
|
|
|
2018-08-28 17:24:14 +01:00
|
|
|
from app.models import BRANDING_ORG
|
|
|
|
|
|
|
|
|
|
revision = '0219_default_email_branding'
|
2023-07-26 15:51:50 -07:00
|
|
|
down_revision = '0216_remove_colours'
|
2018-08-28 17:24:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
2023-07-17 13:16:50 -07:00
|
|
|
conn = op.get_bind()
|
|
|
|
|
input_params = {
|
|
|
|
|
"branding_org": BRANDING_ORG
|
|
|
|
|
}
|
|
|
|
|
conn.execute(text("""
|
2018-08-28 17:24:14 +01:00
|
|
|
update
|
|
|
|
|
email_branding
|
|
|
|
|
set
|
2023-07-17 13:16:50 -07:00
|
|
|
brand_type = :branding_org
|
2018-08-28 17:24:14 +01:00
|
|
|
where
|
|
|
|
|
brand_type is null
|
2023-07-17 13:16:50 -07:00
|
|
|
"""), input_params)
|
2018-08-28 17:24:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
|
pass
|