Object FlakeIds: also update data_migration_failed_ids table

This commit is contained in:
Alex Gleason 2021-12-24 10:13:24 -06:00
parent 73cde0aeeb
commit 1776ea1c86
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -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