From: Dessalines Date: Tue, 21 Apr 2020 13:21:29 +0000 (-0400) Subject: Change local unique username constraints. X-Git-Url: http://these/git/%7B%60https:/readmes/static/%7B%60/feeds/%7BimageUploadUrl%7D?a=commitdiff_plain;h=697c62fb64586dffbb5b7c3083a8c389b0abe712;p=lemmy.git Change local unique username constraints. --- diff --git a/server/migrations/2020-04-21-123957_remove_unique_user_constraints/down.sql b/server/migrations/2020-04-21-123957_remove_unique_user_constraints/down.sql new file mode 100644 index 00000000..a172581a --- /dev/null +++ b/server/migrations/2020-04-21-123957_remove_unique_user_constraints/down.sql @@ -0,0 +1,4 @@ +-- The username index +drop index idx_user_name_lower_actor_id; +create unique index idx_user_name_lower on user_ (lower(name)); + diff --git a/server/migrations/2020-04-21-123957_remove_unique_user_constraints/up.sql b/server/migrations/2020-04-21-123957_remove_unique_user_constraints/up.sql new file mode 100644 index 00000000..969eab0b --- /dev/null +++ b/server/migrations/2020-04-21-123957_remove_unique_user_constraints/up.sql @@ -0,0 +1,2 @@ +drop index idx_user_name_lower; +create unique index idx_user_name_lower_actor_id on user_ (lower(name), lower(actor_id));