1 defmodule Pleroma.Repo.Migrations.ChangeChatIdToFlake do
7 drop constraint chats_pkey cascade,
8 alter column id drop default,
9 alter column id set data type uuid using cast( lpad( to_hex(id), 32, '0') as uuid),
14 alter table chat_message_references
15 alter column chat_id set data type uuid using cast( lpad( to_hex(chat_id), 32, '0') as uuid),
16 add constraint chat_message_references_chat_id_fkey foreign key (chat_id) references chats(id) on delete cascade