Add creation_address column to users
This is a properly typed and indexed column that is intended to replace creation_ip to allow fast queries.
This commit is contained in:
parent
1a5fb52c28
commit
336ad6db03
4 changed files with 21 additions and 1 deletions
8
db/migrate/20240910175616_add_user_creation_address.rb
Normal file
8
db/migrate/20240910175616_add_user_creation_address.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
class AddUserCreationAddress < ActiveRecord::Migration[7.1]
|
||||
disable_ddl_transaction!
|
||||
|
||||
def change
|
||||
add_column :users, :creation_address, :inet
|
||||
add_index :users, :creation_address, :using => :gist, :opclass => :inet_ops, :algorithm => :concurrently
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue