aboutsummaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2022-01-25 15:35:47 +0000
committerAlex Gleason <alex@alexgleason.me>2022-01-25 15:35:47 +0000
commitdd7977bb68f8289b1487159a81df510da11cd944 (patch)
tree9266f4bee07fe384076ae6ff6f3b7839cf142942 /priv
parent19d557c870c3ec43dd3b0ee7ea85259a89bd9a80 (diff)
parent249fe88d12345c1c93f1812871cd70424b9e9a0d (diff)
downloadpleroma-dd7977bb68f8289b1487159a81df510da11cd944.tar.gz
Merge branch 'birth-dates' into 'develop'
Birth dates See merge request pleroma/pleroma!3608
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20220116183110_add_birthday_to_users.exs12
-rw-r--r--priv/repo/migrations/20220125104429_add_birthday_month_day_index_to_users.exs11
-rw-r--r--priv/static/schemas/litepub-0.1.jsonld3
3 files changed, 25 insertions, 1 deletions
diff --git a/priv/repo/migrations/20220116183110_add_birthday_to_users.exs b/priv/repo/migrations/20220116183110_add_birthday_to_users.exs
new file mode 100644
index 000000000..0b22ecc69
--- /dev/null
+++ b/priv/repo/migrations/20220116183110_add_birthday_to_users.exs
@@ -0,0 +1,12 @@
+defmodule Pleroma.Repo.Migrations.AddBirthdayToUsers do
+ use Ecto.Migration
+
+ def change do
+ alter table(:users) do
+ add_if_not_exists(:birthday, :date)
+ add_if_not_exists(:show_birthday, :boolean, default: false, null: false)
+ end
+
+ create_if_not_exists(index(:users, [:show_birthday]))
+ end
+end
diff --git a/priv/repo/migrations/20220125104429_add_birthday_month_day_index_to_users.exs b/priv/repo/migrations/20220125104429_add_birthday_month_day_index_to_users.exs
new file mode 100644
index 000000000..8ce4c77c5
--- /dev/null
+++ b/priv/repo/migrations/20220125104429_add_birthday_month_day_index_to_users.exs
@@ -0,0 +1,11 @@
+defmodule Pleroma.Repo.Migrations.AddBirthdayMonthDayIndexToUsers do
+ use Ecto.Migration
+
+ def change do
+ create(
+ index(:users, ["date_part('month', birthday)", "date_part('day', birthday)"],
+ name: :users_birthday_month_day_index
+ )
+ )
+ end
+end
diff --git a/priv/static/schemas/litepub-0.1.jsonld b/priv/static/schemas/litepub-0.1.jsonld
index e7722cf72..946099a6e 100644
--- a/priv/static/schemas/litepub-0.1.jsonld
+++ b/priv/static/schemas/litepub-0.1.jsonld
@@ -35,7 +35,8 @@
"alsoKnownAs": {
"@id": "as:alsoKnownAs",
"@type": "@id"
- }
+ },
+ "vcard": "http://www.w3.org/2006/vcard/ns#"
}
]
}