diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2019-07-16 16:19:19 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-07-16 16:19:19 +0300 |
commit | 9bca70b10a4c1a7664616b90c50c10c2a8a1003e (patch) | |
tree | d228fe80c6ed7869e4b24fd758b03d2ab489d7d6 /priv | |
parent | b052a9d4d0323eb64c0a741a499906659a674244 (diff) | |
parent | d3b922276138cf7aaa896d52a8e35113a40e22dc (diff) | |
download | pleroma-9bca70b10a4c1a7664616b90c50c10c2a8a1003e.tar.gz |
Merge develop
Diffstat (limited to 'priv')
-rw-r--r-- | priv/repo/migrations/20190516112144_add_ap_id_to_lists.exs | 26 | ||||
-rw-r--r-- | priv/static/schemas/litepub-0.1.jsonld | 4 |
2 files changed, 30 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190516112144_add_ap_id_to_lists.exs b/priv/repo/migrations/20190516112144_add_ap_id_to_lists.exs new file mode 100644 index 000000000..3c32bc355 --- /dev/null +++ b/priv/repo/migrations/20190516112144_add_ap_id_to_lists.exs @@ -0,0 +1,26 @@ +defmodule Pleroma.Repo.Migrations.AddApIdToLists do + use Ecto.Migration + + def up do + alter table(:lists) do + add(:ap_id, :string) + end + + execute(""" + UPDATE lists + SET ap_id = u.ap_id || '/lists/' || lists.id + FROM users AS u + WHERE lists.user_id = u.id + """) + + create(unique_index(:lists, :ap_id)) + end + + def down do + drop(index(:lists, [:ap_id])) + + alter table(:lists) do + remove(:ap_id) + end + end +end diff --git a/priv/static/schemas/litepub-0.1.jsonld b/priv/static/schemas/litepub-0.1.jsonld index f36b231c5..57ed05eba 100644 --- a/priv/static/schemas/litepub-0.1.jsonld +++ b/priv/static/schemas/litepub-0.1.jsonld @@ -20,6 +20,10 @@ "sensitive": "as:sensitive", "litepub": "http://litepub.social/ns#", "directMessage": "litepub:directMessage", + "listMessage": { + "@id": "litepub:listMessage", + "@type": "@id" + }, "oauthRegistrationEndpoint": { "@id": "litepub:oauthRegistrationEndpoint", "@type": "@id" |