]> Untitled Git - lemmy.git/commitdiff
Change local unique username constraints.
authorDessalines <tyhou13@gmx.com>
Tue, 21 Apr 2020 13:21:29 +0000 (09:21 -0400)
committerDessalines <tyhou13@gmx.com>
Tue, 21 Apr 2020 13:21:29 +0000 (09:21 -0400)
server/migrations/2020-04-21-123957_remove_unique_user_constraints/down.sql [new file with mode: 0644]
server/migrations/2020-04-21-123957_remove_unique_user_constraints/up.sql [new file with mode: 0644]

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 (file)
index 0000000..a172581
--- /dev/null
@@ -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 (file)
index 0000000..969eab0
--- /dev/null
@@ -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));