Fix migration
This commit is contained in:
parent
ed639376ac
commit
494a611afe
@ -2,18 +2,24 @@ defmodule Pleroma.Repo.Migrations.CaseInsensivtivity do
|
|||||||
use Ecto.Migration
|
use Ecto.Migration
|
||||||
|
|
||||||
def up do
|
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
|
alter table(:users) do
|
||||||
modify :email, :citext
|
modify(:email, :citext)
|
||||||
modify :nickname, :citext
|
modify(:nickname, :citext)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_if_not_exists(index(:users, [:email]))
|
||||||
end
|
end
|
||||||
|
|
||||||
def down do
|
def down do
|
||||||
alter table(:users) do
|
alter table(:users) do
|
||||||
modify :email, :string
|
modify(:email, :string)
|
||||||
modify :nickname, :string
|
modify(:nickname, :string)
|
||||||
end
|
end
|
||||||
execute ("drop extension if exists citext")
|
|
||||||
|
execute("drop extension if exists citext")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user