diff options
-rw-r--r-- | priv/repo/migrations/20211218181632_change_object_id_to_flake.exs | 8 |
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 |