akkoma/priv/repo/migrations/20170522160642_case_insensivtivity.exs

26 lines
515 B
Elixir
Raw Normal View History

defmodule Pleroma.Repo.Migrations.CaseInsensivtivity do
use Ecto.Migration
def up do
2019-07-02 22:14:40 +00:00
execute("create extension if not exists citext")
drop_if_exists(index(:users, [:email]))
alter table(:users) do
2019-07-02 22:14:40 +00:00
modify(:email, :citext)
modify(:nickname, :citext)
end
2019-07-02 22:14:40 +00:00
create_if_not_exists(index(:users, [:email]))
end
def down do
alter table(:users) do
2019-07-02 22:14:40 +00:00
modify(:email, :string)
modify(:nickname, :string)
end
2019-07-02 22:14:40 +00:00
execute("drop extension if exists citext")
end
end