Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

24 líneas
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