summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-12-24 10:13:24 -0600
committerAlex Gleason <alex@alexgleason.me>2021-12-24 10:13:24 -0600
commit1776ea1c8651a511335ffd9c89871f52b91fe18b (patch)
tree8ac6471a5ddb17839ecb27a6b6e433e1e36279f9
parent73cde0aeeb89e68c18bb0e3c0de1c6c975bf5dd8 (diff)
Object FlakeIds: also update data_migration_failed_ids table
-rw-r--r--priv/repo/migrations/20211218181632_change_object_id_to_flake.exs8
1 files changed, 8 insertions, 0 deletions
diff --git a/priv/repo/migrations/20211218181632_change_object_id_to_flake.exs b/priv/repo/migrations/20211218181632_change_object_id_to_flake.exs
index 3eebe3ef2..a4533b2ab 100644
--- a/priv/repo/migrations/20211218181632_change_object_id_to_flake.exs
+++ b/priv/repo/migrations/20211218181632_change_object_id_to_flake.exs
@@ -15,6 +15,14 @@ defmodule Pleroma.Repo.Migrations.ChangeObjectIdToFlake do
add primary key (id)
""")
+ # Update data_migration_failed_ids
+ execute("""
+ alter table data_migration_failed_ids
+ drop constraint data_migration_failed_ids_pkey cascade,
+ alter column record_id set data type uuid using cast( lpad( to_hex(record_id), 32, '0') as uuid),
+ add primary key (data_migration_id, record_id)
+ """)
+
# Update chat message foreign key
execute("""
alter table chat_message_references