summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorLain Soykaf <lain@lain.com>2024-03-19 16:26:02 +0400
committerLain Soykaf <lain@lain.com>2024-03-19 16:26:02 +0400
commit4e8a1b40cb7014a14d209d4438491a66246802b1 (patch)
tree25db7854e3d1b017a4abe2ae7b7687a744da82c6 /priv
parent8a14fdbe479ca0ffb3419a83cf3c637b72dd54e0 (diff)
parent4e37cd85ef5b1134913441166219f09220fd4942 (diff)
downloadpleroma-4e8a1b40cb7014a14d209d4438491a66246802b1.tar.gz
pleroma-4e8a1b40cb7014a14d209d4438491a66246802b1.zip
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into transient-validators-defaults
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20240223165000_create_bookmark_folders.exs27
-rw-r--r--priv/static/schemas/litepub-0.1.jsonld4
2 files changed, 30 insertions, 1 deletions
diff --git a/priv/repo/migrations/20240223165000_create_bookmark_folders.exs b/priv/repo/migrations/20240223165000_create_bookmark_folders.exs
new file mode 100644
index 000000000..016916968
--- /dev/null
+++ b/priv/repo/migrations/20240223165000_create_bookmark_folders.exs
@@ -0,0 +1,27 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2024 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
+defmodule Pleroma.Repo.Migrations.CreateBookmarkFolders do
+ use Ecto.Migration
+
+ def change do
+ create_if_not_exists table(:bookmark_folders, primary_key: false) do
+ add(:id, :uuid, primary_key: true)
+ add(:name, :string, null: false)
+ add(:emoji, :string)
+ add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
+
+ timestamps()
+ end
+
+ alter table(:bookmarks) do
+ add_if_not_exists(
+ :folder_id,
+ references(:bookmark_folders, type: :uuid, on_delete: :nilify_all)
+ )
+ end
+
+ create_if_not_exists(unique_index(:bookmark_folders, [:user_id, :name]))
+ end
+end
diff --git a/priv/static/schemas/litepub-0.1.jsonld b/priv/static/schemas/litepub-0.1.jsonld
index b499a96f5..d156cba55 100644
--- a/priv/static/schemas/litepub-0.1.jsonld
+++ b/priv/static/schemas/litepub-0.1.jsonld
@@ -40,7 +40,9 @@
"@type": "@id"
},
"vcard": "http://www.w3.org/2006/vcard/ns#",
- "formerRepresentations": "litepub:formerRepresentations"
+ "formerRepresentations": "litepub:formerRepresentations",
+ "sm": "http://smithereen.software/ns#",
+ "nonAnonymous": "sm:nonAnonymous"
}
]
}