summaryrefslogtreecommitdiffstats
path: root/server/migrations
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-04-21 09:21:29 -0400
committerDessalines <tyhou13@gmx.com>2020-04-21 09:21:29 -0400
commit697c62fb64586dffbb5b7c3083a8c389b0abe712 (patch)
tree83c82f9f5743d68d6b8c436e896ee188db546042 /server/migrations
parent1e7c3841b2f3fd7f46b1fda3faeecca1c312bc1a (diff)
Change local unique username constraints.
Diffstat (limited to 'server/migrations')
-rw-r--r--server/migrations/2020-04-21-123957_remove_unique_user_constraints/down.sql4
-rw-r--r--server/migrations/2020-04-21-123957_remove_unique_user_constraints/up.sql2
2 files changed, 6 insertions, 0 deletions
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));