Create index for `show_birthday`

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-01-23 09:54:24 +01:00
parent e3d394eef6
commit 61bae9a407
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
defmodule Pleroma.Repo.Migrations.AddBirthDateToUsers do defmodule Pleroma.Repo.Migrations.AddBirthdayToUsers do
use Ecto.Migration use Ecto.Migration
def change do def change do
@ -6,5 +6,7 @@ def change do
add_if_not_exists(:birthday, :date) add_if_not_exists(:birthday, :date)
add_if_not_exists(:show_birthday, :boolean, default: false, null: false) add_if_not_exists(:show_birthday, :boolean, default: false, null: false)
end end
create_if_not_exists(index(:users, [:show_birthday]))
end end
end end