mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-19 21:05:15 +00:00
index users on username (#674)
This commit is contained in:
parent
04ce935e69
commit
5f5257c752
2 changed files with 9 additions and 2 deletions
7
db/migrate/20251201161700_add_index_to_users_username.rb
Normal file
7
db/migrate/20251201161700_add_index_to_users_username.rb
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
class AddIndexToUsersUsername < ActiveRecord::Migration[8.0]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :users, :username, algorithm: :concurrently
|
||||
end
|
||||
end
|
||||
4
db/schema.rb
generated
4
db/schema.rb
generated
|
|
@ -10,9 +10,8 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.1].define(version: 2025_11_16_045500) do
|
||||
ActiveRecord::Schema[8.1].define(version: 2025_12_01_161700) do
|
||||
create_schema "pganalyze"
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
enable_extension "pg_stat_statements"
|
||||
|
|
@ -568,6 +567,7 @@ ActiveRecord::Schema[8.1].define(version: 2025_11_16_045500) do
|
|||
t.index ["slack_uid"], name: "index_users_on_slack_uid", unique: true
|
||||
t.index ["timezone", "trust_level"], name: "index_users_on_timezone_trust_level"
|
||||
t.index ["timezone"], name: "index_users_on_timezone"
|
||||
t.index ["username"], name: "index_users_on_username"
|
||||
end
|
||||
|
||||
create_table "versions", force: :cascade do |t|
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue