This website works better with JavaScript.
Home
Explore
lain.church
Help
Register
Sign In
squeegily
/
pleroma
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
42
Wiki
Activity
Browse Source
Migrations: Add unique index to ChatMessageReferences.
1570-levenshtein-distance-user-search
lain
4 years ago
parent
2591745fc2
commit
6413e06a86
1 changed files
with
14 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+14
-0
priv/repo/migrations/20200603105113_add_unique_index_to_chat_message_references.exs
+ 14
- 0
priv/repo/migrations/20200603105113_add_unique_index_to_chat_message_references.exs
View File
@@ -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
Write
Preview
Loading…
Cancel
Save