Files
notifications-api/migrations/versions/0211_email_branding_update_.py
Rebecca Law c30e58eaad Instead of deleting the data in the name field just copy it to the text field.
The admin app still needs to use the name column.
Add the text field to the post data schemas.
If the text is not in the post data, then populate it with the data in the name field.
This should make the migration to text easier, and will work until we are able to update the admin app.
2018-08-02 15:55:45 +01:00

23 lines
492 B
Python

"""
Revision ID: 0211_email_branding_update
Revises: 0210_remove_monthly_billing
Create Date: 2018-07-31 18:00:20.457755
"""
from alembic import op
import sqlalchemy as sa
revision = '0211_email_branding_update'
down_revision = '0210_remove_monthly_billing'
def upgrade():
op.add_column('email_branding', sa.Column('text', sa.String(length=255), nullable=True))
op.execute('UPDATE email_branding SET text = name')
def downgrade():
op.drop_column('email_branding', 'text')