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 000000000..a172581a1 --- /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 000000000..969eab0b6 --- /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));