1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-19 03:19:17 +00:00

Merge branch 'fix/revert-citext-uri' into 'develop'

Revert citext user URI migration

Closes #2188

See merge request pleroma/pleroma!3042
This commit is contained in:
rinpatch 2020-09-28 15:44:20 +00:00
commit 30b79b0eb3
3 changed files with 16 additions and 15 deletions

View file

@ -1,19 +1,9 @@
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
def change do
# Migration retired, see
# https://git.pleroma.social/pleroma/pleroma/-/issues/2188
:noop
end
end

View file

@ -0,0 +1,11 @@
defmodule Pleroma.Repo.Migrations.RevertCitextChange do
use Ecto.Migration
def change do
alter table(:users) do
modify(:uri, :text)
end
create_if_not_exists(unique_index(:users, :uri))
end
end

View file

@ -41,7 +41,7 @@ test "returns a user with matching uri as the first result" 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"})