summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2019-09-17 22:53:26 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2019-09-17 22:53:26 +0300
commit01c1078015c1ddbaa195125034489a14233df206 (patch)
tree01c63b7d6a8040decf6e0cd1630b715ca2cb29c6 /priv
parent76068873dbf9da191dd2487158ca88df198b811a (diff)
parent79376abae347a5039931f57c581074b6da859827 (diff)
downloadpleroma-01c1078015c1ddbaa195125034489a14233df206.tar.gz
pleroma-01c1078015c1ddbaa195125034489a14233df206.zip
[#1234] Merge remote-tracking branch 'remotes/upstream/develop' into 1234-mastodon-2-4-3-oauth-scopes
# Conflicts: # lib/pleroma/web/activity_pub/activity_pub_controller.ex
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20190730055101_add_oban_jobs_table.exs6
-rw-r--r--priv/repo/migrations/20190912065617_create_deliveries.exs12
-rw-r--r--priv/repo/migrations/20190917100019_update_oban.exs11
3 files changed, 29 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190730055101_add_oban_jobs_table.exs b/priv/repo/migrations/20190730055101_add_oban_jobs_table.exs
new file mode 100644
index 000000000..2f201bd05
--- /dev/null
+++ b/priv/repo/migrations/20190730055101_add_oban_jobs_table.exs
@@ -0,0 +1,6 @@
+defmodule Pleroma.Repo.Migrations.AddObanJobsTable do
+ use Ecto.Migration
+
+ defdelegate up, to: Oban.Migrations
+ defdelegate down, to: Oban.Migrations
+end
diff --git a/priv/repo/migrations/20190912065617_create_deliveries.exs b/priv/repo/migrations/20190912065617_create_deliveries.exs
new file mode 100644
index 000000000..79071a799
--- /dev/null
+++ b/priv/repo/migrations/20190912065617_create_deliveries.exs
@@ -0,0 +1,12 @@
+defmodule Pleroma.Repo.Migrations.CreateDeliveries do
+ use Ecto.Migration
+
+ def change do
+ create_if_not_exists table(:deliveries) do
+ add(:object_id, references(:objects, type: :id), null: false)
+ add(:user_id, references(:users, type: :uuid, on_delete: :delete_all), null: false)
+ end
+ create_if_not_exists index(:deliveries, :object_id, name: :deliveries_object_id)
+ create_if_not_exists(unique_index(:deliveries, [:user_id, :object_id]))
+ end
+end
diff --git a/priv/repo/migrations/20190917100019_update_oban.exs b/priv/repo/migrations/20190917100019_update_oban.exs
new file mode 100644
index 000000000..157dc54f9
--- /dev/null
+++ b/priv/repo/migrations/20190917100019_update_oban.exs
@@ -0,0 +1,11 @@
+defmodule Pleroma.Repo.Migrations.UpdateOban do
+ use Ecto.Migration
+
+ def up do
+ Oban.Migrations.up(version: 4)
+ end
+
+ def down do
+ Oban.Migrations.down(version: 2)
+ end
+end