Defect #43838 » 0001-Adds-index-on-user-login-and-lower-login.patch
| app/helpers/application_helper.rb | ||
|---|---|---|
|
link = link_to_project(p, {:only_path => only_path}, :class => 'project')
|
||
|
end
|
||
|
when 'user'
|
||
|
u = User.visible.find_by(login: name.downcase)
|
||
|
u = User.visible.find_by_login(name.downcase)
|
||
|
link = link_to_user(u, :only_path => only_path) if u
|
||
|
end
|
||
|
elsif sep == "@"
|
||
|
name = remove_double_quotes(identifier)
|
||
|
u = User.visible.find_by(login: name.downcase)
|
||
|
u = User.visible.find_by_login(name.downcase)
|
||
|
link = link_to_mention(u, obj, only_path: only_path) if u
|
||
|
end
|
||
|
end
|
||
| db/migrate/20260221060647_add_index_to_users_login.rb → db/migrate/20260225170822_add_index_to_users_login.rb | ||
|---|---|---|
|
class AddIndexToUsersLogin < ActiveRecord::Migration[8.1]
|
||
|
def change
|
||
|
def up
|
||
|
add_index :users, :login
|
||
|
end
|
||
|
def down
|
||
|
remove_index :users, :login
|
||
|
end
|
||
|
end
|
||
| db/migrate/20260225170833_add_index_to_users_lower_login.rb | ||
|---|---|---|
|
class AddIndexToUsersLowerLogin < ActiveRecord::Migration[8.1]
|
||
|
def up
|
||
|
add_index :users, "(lower(login))", name: "index_users_on_lower_login"
|
||
|
end
|
||
|
def down
|
||
|
remove_index :users, name: "index_users_on_lower_login"
|
||
|
end
|
||
|
end
|
||