Make email and nickname case insensitive.
This commit is contained in:
parent
9d97be4413
commit
47684c2a2c
2 changed files with 26 additions and 0 deletions
19
priv/repo/migrations/20170522160642_case_insensivtivity.exs
Normal file
19
priv/repo/migrations/20170522160642_case_insensivtivity.exs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
defmodule Pleroma.Repo.Migrations.CaseInsensivtivity do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
execute ("create extension if not exists citext")
|
||||
alter table(:users) do
|
||||
modify :email, :citext
|
||||
modify :nickname, :citext
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:users) do
|
||||
modify :email, :string
|
||||
modify :nickname, :string
|
||||
end
|
||||
execute ("drop extension if exists citext")
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue