logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

20240530011739_add_missing_foreign_keys.exs (972B)


  1. defmodule Pleroma.Repo.Migrations.AddMissingForeignKeys do
  2. use Ecto.Migration
  3. def change do
  4. create_if_not_exists(index(:announcement_read_relationships, :announcement_id))
  5. create_if_not_exists(index(:bookmarks, :activity_id))
  6. create_if_not_exists(index(:bookmarks, :folder_id))
  7. create_if_not_exists(index(:chats, :recipient))
  8. create_if_not_exists(index(:mfa_tokens, :authorization_id))
  9. create_if_not_exists(index(:mfa_tokens, :user_id))
  10. create_if_not_exists(index(:notifications, :activity_id))
  11. create_if_not_exists(index(:oauth_authorizations, :app_id))
  12. create_if_not_exists(index(:oauth_authorizations, :user_id))
  13. create_if_not_exists(index(:password_reset_tokens, :user_id))
  14. create_if_not_exists(index(:push_subscriptions, :token_id))
  15. create_if_not_exists(index(:report_notes, :activity_id))
  16. create_if_not_exists(index(:report_notes, :user_id))
  17. create_if_not_exists(index(:user_notes, :target_id))
  18. end
  19. end