mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
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.
This commit is contained in:
@@ -14,14 +14,9 @@ down_revision = '0210_remove_monthly_billing'
|
||||
|
||||
|
||||
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! ###
|
||||
op.execute('UPDATE email_branding SET name = text')
|
||||
op.drop_column('email_branding', 'text')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
Reference in New Issue
Block a user