Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

24 rindas
645B

  1. defmodule Pleroma.Repo.Migrations.ChangeChatIdToFlake do
  2. use Ecto.Migration
  3. def up do
  4. execute("""
  5. alter table chats
  6. drop constraint chats_pkey cascade,
  7. alter column id drop default,
  8. alter column id set data type uuid using cast( lpad( to_hex(id), 32, '0') as uuid),
  9. add primary key (id)
  10. """)
  11. execute("""
  12. alter table chat_message_references
  13. alter column chat_id set data type uuid using cast( lpad( to_hex(chat_id), 32, '0') as uuid),
  14. add constraint chat_message_references_chat_id_fkey foreign key (chat_id) references chats(id) on delete cascade
  15. """)
  16. end
  17. def down do
  18. :ok
  19. end
  20. end