projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add emojo
[akkoma]
/
priv
/
repo
/
migrations
/
20190205114625_create_thread_mutes.exs
diff --git
a/priv/repo/migrations/20190205114625_create_thread_mutes.exs
b/priv/repo/migrations/20190205114625_create_thread_mutes.exs
index 16083332b4dfeaaedaf8b699b7bbe1b20684df51..7e44db1214ab8ebefb4cadbed85fb4d68f2fa472 100644
(file)
--- a/
priv/repo/migrations/20190205114625_create_thread_mutes.exs
+++ b/
priv/repo/migrations/20190205114625_create_thread_mutes.exs
@@
-2,11
+2,11
@@
defmodule Pleroma.Repo.Migrations.CreateThreadMutes do
use Ecto.Migration
def change do
use Ecto.Migration
def change do
- create table(:thread_mutes) do
- add :user, references(:users, type: :uuid, on_delete: :delete_all)
+ create
_if_not_exists
table(:thread_mutes) do
+ add :user
_id
, references(:users, type: :uuid, on_delete: :delete_all)
add :context, :string
end
add :context, :string
end
- create
index(:thread_mutes, [:user]
)
+ create
_if_not_exists unique_index(:thread_mutes, [:user_id, :context], name: :unique_index
)
end
end
end
end