aboutsummaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorMaksim Pechnikov <parallel588@gmail.com>2019-10-17 15:26:59 +0300
committerMaksim Pechnikov <parallel588@gmail.com>2019-10-17 15:26:59 +0300
commit66b5d0ff558bffeddf6475af72b73bf2870512f6 (patch)
treeb46326a6ab9c90eccb6f396d310695802141ab95 /priv
parente3b4a3e96b2ffbc6d920155cd41687414045d4d6 (diff)
downloadpleroma-66b5d0ff558bffeddf6475af72b73bf2870512f6.tar.gz
add Markers /api/v1/markers
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20191014181019_create_markers.exs15
1 files changed, 15 insertions, 0 deletions
diff --git a/priv/repo/migrations/20191014181019_create_markers.exs b/priv/repo/migrations/20191014181019_create_markers.exs
new file mode 100644
index 000000000..c717831ba
--- /dev/null
+++ b/priv/repo/migrations/20191014181019_create_markers.exs
@@ -0,0 +1,15 @@
+defmodule Pleroma.Repo.Migrations.CreateMarkers do
+ use Ecto.Migration
+
+ def change do
+ create_if_not_exists table(:markers) do
+ add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
+ add(:timeline, :string, default: "", null: false)
+ add(:last_read_id, :string, default: "", null: false)
+ add(:lock_version, :integer, default: 0, null: false)
+ timestamps()
+ end
+
+ create_if_not_exists(unique_index(:markers, [:user_id, :timeline]))
+ end
+end