1
0
Fork 0
forked from mirrors/akkoma

Fix migration

This commit is contained in:
Roman Chvanikov 2019-07-03 01:14:40 +03:00
parent a565dbde4f
commit 291d95dcc3

View file

@ -2,18 +2,24 @@ defmodule Pleroma.Repo.Migrations.CaseInsensivtivity do
use Ecto.Migration
def up do
execute ("create extension if not exists citext")
execute("create extension if not exists citext")
drop_if_exists(index(:users, [:email]))
alter table(:users) do
modify :email, :citext
modify :nickname, :citext
modify(:email, :citext)
modify(:nickname, :citext)
end
create_if_not_exists(index(:users, [:email]))
end
def down do
alter table(:users) do
modify :email, :string
modify :nickname, :string
modify(:email, :string)
modify(:nickname, :string)
end
execute ("drop extension if exists citext")
execute("drop extension if exists citext")
end
end