diff options
author | marcin mikołajczak <git@mkljczk.pl> | 2022-01-23 09:54:24 +0100 |
---|---|---|
committer | marcin mikołajczak <git@mkljczk.pl> | 2022-01-23 12:07:05 +0100 |
commit | 61bae9a407ae9480e46e3a33d0b7d1f4c940b02c (patch) | |
tree | 5aaee8ef406119383bc87c906ff3cc6c855e1a55 | |
parent | e3d394eef64f96210b144c40d3055d0662da7109 (diff) | |
download | pleroma-61bae9a407ae9480e46e3a33d0b7d1f4c940b02c.tar.gz |
Create index for `show_birthday`
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
-rw-r--r-- | priv/repo/migrations/20220116183110_add_birthday_to_users.exs (renamed from priv/repo/migrations/29220116183110_add_birth_date_to_users.exs) | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/priv/repo/migrations/29220116183110_add_birth_date_to_users.exs b/priv/repo/migrations/20220116183110_add_birthday_to_users.exs index 57fedaee2..0b22ecc69 100644 --- a/priv/repo/migrations/29220116183110_add_birth_date_to_users.exs +++ b/priv/repo/migrations/20220116183110_add_birthday_to_users.exs @@ -1,4 +1,4 @@ -defmodule Pleroma.Repo.Migrations.AddBirthDateToUsers do +defmodule Pleroma.Repo.Migrations.AddBirthdayToUsers do use Ecto.Migration def change do @@ -6,5 +6,7 @@ defmodule Pleroma.Repo.Migrations.AddBirthDateToUsers 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 |