Merge pull request 'Manually define PATH for Arch Linux users in systemd unit' (...
[akkoma] / priv / repo / migrations / 20170426154155_create_websub_client_subscription.exs
index 89d3af7aee5ff7ac67c47c44b50f3fc29213c270..d020614e13d28cf357ccfc381633987a905d80f5 100644 (file)
@@ -2,12 +2,12 @@ defmodule Pleroma.Repo.Migrations.CreateWebsubClientSubscription do
   use Ecto.Migration
 
   def change do
-    create table(:websub_client_subscriptions) do
-      add :topic, :string
-      add :secret, :string
-      add :valid_until, :naive_datetime_usec
-      add :state, :string
-      add :subscribers, :map
+    create_if_not_exists table(:websub_client_subscriptions) do
+      add(:topic, :string)
+      add(:secret, :string)
+      add(:valid_until, :naive_datetime_usec)
+      add(:state, :string)
+      add(:subscribers, :map)
 
       timestamps()
     end