mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-22 09:18:18 +00:00
User search: Make uri matches case insensitive.
This commit is contained in:
parent
a8c17ea25a
commit
1e0f3f8514
19
priv/repo/migrations/20200925065249_make_user_ids_ci.exs
Normal file
19
priv/repo/migrations/20200925065249_make_user_ids_ci.exs
Normal file
|
@ -0,0 +1,19 @@
|
|||
defmodule Pleroma.Repo.Migrations.MakeUserIdsCI do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:users) do
|
||||
modify(:uri, :citext)
|
||||
end
|
||||
|
||||
create(unique_index(:users, :uri))
|
||||
end
|
||||
|
||||
def don do
|
||||
drop(unique_index(:users, :uri))
|
||||
|
||||
alter table(:users) do
|
||||
modify(:uri, :text)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -41,7 +41,7 @@ defmodule Pleroma.UserSearchTest do
|
|||
insert(:user, %{
|
||||
nickname: "no_relation",
|
||||
ap_id: "https://lain.com/users/lain",
|
||||
uri: "https://lain.com/@lain"
|
||||
uri: "https://lain.com/@Lain"
|
||||
})
|
||||
|
||||
_user = insert(:user, %{nickname: "com_user"})
|
||||
|
|
Loading…
Reference in a new issue