mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-10 15:22:24 -05:00
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.
23 lines
492 B
Python
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')
|