pleroma/priv/repo/migrations/20220125104429_add_birthday_month_day_index_to_users.exs
marcin mikołajczak 249fe88d12 Birthdays: users_birthday_month_day_index
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-25 11:49:42 +01:00

12 lines
273 B
Elixir

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