2018-07-25 16:20:40 +01:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
Revision ID: 0209_email_branding_update
|
|
|
|
|
Revises: 84c3b6eb16b3
|
|
|
|
|
Create Date: 2018-07-25 16:08:15.713656
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
from alembic import op
|
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
revision = '0209_email_branding_update'
|
|
|
|
|
down_revision = '84c3b6eb16b3'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
|
op.add_column('email_branding', sa.Column('text', sa.String(length=255), nullable=True))
|
|
|
|
|
op.execute('UPDATE email_branding SET text = name')
|
|
|
|
|
op.execute('UPDATE email_branding SET name = NULL')
|
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2018-07-27 10:29:58 +01:00
|
|
|
op.execute('UPDATE email_branding SET name = text')
|
2018-07-25 16:20:40 +01:00
|
|
|
op.drop_column('email_branding', 'text')
|
|
|
|
|
# ### end Alembic commands ###
|