1 defmodule Pleroma.Repo.Migrations.CaseInsensivtivity do
4 # Two-steps alters are intentional.
5 # When alter of 2 columns is done in a single operation,
6 # inconsistent failures happen because of index on `email` column.
9 execute("create extension if not exists citext")
11 alter table(:users) do
12 modify(:email, :citext)
15 alter table(:users) do
16 modify(:nickname, :citext)
21 alter table(:users) do
22 modify(:email, :string)
25 alter table(:users) do
26 modify(:nickname, :string)
29 execute("drop extension if exists citext")