From 249fe88d12345c1c93f1812871cd70424b9e9a0d Mon Sep 17 00:00:00 2001 From: marcin mikołajczak Date: Tue, 25 Jan 2022 10:45:32 +0100 Subject: Birthdays: users_birthday_month_day_index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../20220125104429_add_birthday_month_day_index_to_users.exs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 priv/repo/migrations/20220125104429_add_birthday_month_day_index_to_users.exs 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 -- cgit v1.2.3