Migrations: Add unique index to ChatMessageReferences.
This commit is contained in:
parent
2591745fc2
commit
6413e06a86
1 changed files with 14 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
defmodule Pleroma.Repo.Migrations.BackfillChatMessageReferences do
|
||||
use Ecto.Migration
|
||||
|
||||
alias Pleroma.Chat
|
||||
alias Pleroma.ChatMessageReference
|
||||
alias Pleroma.Object
|
||||
alias Pleroma.Repo
|
||||
|
||||
import Ecto.Query
|
||||
|
||||
def change do
|
||||
create(unique_index(:chat_message_references, [:object_id, :chat_id]))
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue