summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20170911123607_create_notifications.exs
diff options
context:
space:
mode:
authorEgor Kislitsyn <egor@kislitsyn.com>2019-07-11 13:26:59 +0700
committerEgor Kislitsyn <egor@kislitsyn.com>2019-07-11 13:26:59 +0700
commit182f7bbb1170c44eac4ab4a9efa4ff0bff991c98 (patch)
treef4c6fe46e82f667be49c8e6aad0ed3b418e4332f /priv/repo/migrations/20170911123607_create_notifications.exs
parentddd4a09b72ede65345ddf45a68eb239b54eda86c (diff)
parent4016341a77337e3b71295d27808eebc05152b086 (diff)
downloadpleroma-182f7bbb1170c44eac4ab4a9efa4ff0bff991c98.tar.gz
pleroma-182f7bbb1170c44eac4ab4a9efa4ff0bff991c98.zip
Merge branch 'develop' into feature/addressable-lists
Diffstat (limited to 'priv/repo/migrations/20170911123607_create_notifications.exs')
-rw-r--r--priv/repo/migrations/20170911123607_create_notifications.exs4
1 files changed, 2 insertions, 2 deletions
diff --git a/priv/repo/migrations/20170911123607_create_notifications.exs b/priv/repo/migrations/20170911123607_create_notifications.exs
index 5be809fb8..50de9c5f1 100644
--- a/priv/repo/migrations/20170911123607_create_notifications.exs
+++ b/priv/repo/migrations/20170911123607_create_notifications.exs
@@ -2,7 +2,7 @@ defmodule Pleroma.Repo.Migrations.CreateNotifications do
use Ecto.Migration
def change do
- create table(:notifications) do
+ create_if_not_exists table(:notifications) do
add :user_id, references(:users, on_delete: :delete_all)
add :activity_id, references(:activities, on_delete: :delete_all)
add :seen, :boolean, default: false
@@ -10,6 +10,6 @@ defmodule Pleroma.Repo.Migrations.CreateNotifications do
timestamps()
end
- create index(:notifications, [:user_id])
+ create_if_not_exists index(:notifications, [:user_id])
end
end