mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-09 14:42:24 -05:00
api_key_id column will have to be dropped in a separate PR
This is to avoid situation where we deploy migration already but don't deploy code yet and they are not compatible for a while which leads to errors.
This commit is contained in:
@@ -41,13 +41,11 @@ def upgrade():
|
||||
)
|
||||
op.get_bind()
|
||||
op.execute("UPDATE broadcast_message SET created_by_api_key_id=api_key_id") # move data over
|
||||
op.drop_column('broadcast_message', 'api_key_id')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('broadcast_message', sa.Column('api_key_id', postgresql.UUID(), autoincrement=False, nullable=True))
|
||||
op.drop_constraint(
|
||||
"ck_broadcast_message_created_by_not_null",
|
||||
"broadcast_message"
|
||||
|
||||
Reference in New Issue
Block a user