mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-10 10:09:02 +00:00
Fix migration
This commit is contained in:
parent
a565dbde4f
commit
291d95dcc3
|
@ -3,17 +3,23 @@ defmodule Pleroma.Repo.Migrations.CaseInsensivtivity do
|
|||
|
||||
def up do
|
||||
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")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue