Require user names to be unique after unicode normalisation
As with the previous checks on case sensitivity this only affects new users, and changes to names of existing users.
This commit is contained in:
parent
75042a04a1
commit
c12f8959dd
5 changed files with 49 additions and 12 deletions
7
db/migrate/20231213182102_add_canonical_user_index.rb
Normal file
7
db/migrate/20231213182102_add_canonical_user_index.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
class AddCanonicalUserIndex < ActiveRecord::Migration[7.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :users, "LOWER(NORMALIZE(display_name, NFKC))", :name => "users_display_name_canonical_idx", :algorithm => :concurrently
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue