DEV: Add index to users.ip_address
This commit is contained in:
parent
4efcc88039
commit
a28ab171ec
|
@ -2295,6 +2295,7 @@ end
|
|||
# Indexes
|
||||
#
|
||||
# idx_users_admin (id) WHERE admin
|
||||
# idx_users_ip_address (ip_address)
|
||||
# idx_users_moderator (id) WHERE moderator
|
||||
# index_users_on_last_posted_at (last_posted_at)
|
||||
# index_users_on_last_seen_at (last_seen_at)
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddIndexToUsersIpAddress < ActiveRecord::Migration[7.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_index :users, :ip_address, algorithm: :concurrently, name: "idx_users_ip_address"
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue