diff --git a/OpenOversight/migrations/versions/2023-08-01-1905_b38c133bed3c_add_created_by_and_created_at_columns.py b/OpenOversight/migrations/versions/2023-08-01-1905_b38c133bed3c_add_created_by_and_created_at_columns.py index 81ab0b288..5ee9999fd 100644 --- a/OpenOversight/migrations/versions/2023-08-01-1905_b38c133bed3c_add_created_by_and_created_at_columns.py +++ b/OpenOversight/migrations/versions/2023-08-01-1905_b38c133bed3c_add_created_by_and_created_at_columns.py @@ -56,7 +56,6 @@ def upgrade(): with op.batch_alter_table("descriptions", schema=None) as batch_op: batch_op.add_column(sa.Column("created_by", sa.Integer(), nullable=True)) - batch_op.drop_constraint("descriptions_creator_id_fkey", type_="foreignkey") batch_op.create_foreign_key( "descriptions_created_by_fkey", "users", @@ -86,7 +85,6 @@ def upgrade(): nullable=False, ) ) - batch_op.drop_constraint("faces_user_id_fkey", type_="foreignkey") batch_op.create_foreign_key( "faces_created_by_fkey", "users", ["created_by"], ["id"] ) @@ -150,8 +148,6 @@ def upgrade(): nullable=True, ) ) - batch_op.drop_constraint("incidents_last_updated_id_fkey", type_="foreignkey") - batch_op.drop_constraint("incidents_creator_id_fkey", type_="foreignkey") batch_op.create_foreign_key( "incidents_last_updated_by_fkey", "users", @@ -221,7 +217,6 @@ def upgrade(): nullable=False, ) ) - batch_op.drop_constraint("links_creator_id_fkey", type_="foreignkey") batch_op.create_foreign_key( "links_created_by_fkey", "users", @@ -261,7 +256,6 @@ def upgrade(): with op.batch_alter_table("notes", schema=None) as batch_op: batch_op.add_column(sa.Column("created_by", sa.Integer(), nullable=True)) - batch_op.drop_constraint("notes_creator_id_fkey", type_="foreignkey") batch_op.create_foreign_key( "notes_created_by_fkey", "users", @@ -321,7 +315,6 @@ def upgrade(): with op.batch_alter_table("raw_images", schema=None) as batch_op: batch_op.add_column(sa.Column("created_by", sa.Integer(), nullable=True)) - batch_op.drop_constraint("raw_images_user_id_fkey", type_="foreignkey") batch_op.create_foreign_key( "raw_images_created_by_fkey", "users",