From 61bae9a407ae9480e46e3a33d0b7d1f4c940b02c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 23 Jan 2022 09:54:24 +0100 Subject: [PATCH] Create index for `show_birthday` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- ..._to_users.exs => 20220116183110_add_birthday_to_users.exs} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename priv/repo/migrations/{29220116183110_add_birth_date_to_users.exs => 20220116183110_add_birthday_to_users.exs} (63%) diff --git a/priv/repo/migrations/29220116183110_add_birth_date_to_users.exs b/priv/repo/migrations/20220116183110_add_birthday_to_users.exs similarity index 63% rename from priv/repo/migrations/29220116183110_add_birth_date_to_users.exs rename to 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