From 1776ea1c8651a511335ffd9c89871f52b91fe18b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 24 Dec 2021 10:13:24 -0600 Subject: Object FlakeIds: also update data_migration_failed_ids table --- priv/repo/migrations/20211218181632_change_object_id_to_flake.exs | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.3