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:
Tom Hughes 2024-09-10 19:16:03 +01:00
parent 1a5fb52c28
commit 336ad6db03
4 changed files with 21 additions and 1 deletions

View 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