Merge branch 'pull/5207'
This commit is contained in:
commit
0423d18a8f
2 changed files with 15 additions and 0 deletions
14
db/migrate/20240912181413_backfill_user_creation_address.rb
Normal file
14
db/migrate/20240912181413_backfill_user_creation_address.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
class BackfillUserCreationAddress < ActiveRecord::Migration[7.1]
|
||||
class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def up
|
||||
User
|
||||
.where(:creation_address => nil)
|
||||
.where.not(:creation_ip => nil)
|
||||
.in_batches(:of => 1000)
|
||||
.update_all("creation_address = creation_ip::inet")
|
||||
end
|
||||
|
||||
def down; end
|
||||
end
|
|
@ -3357,6 +3357,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
|||
('23'),
|
||||
('22'),
|
||||
('21'),
|
||||
('20240912181413'),
|
||||
('20240910175616'),
|
||||
('20240822121603'),
|
||||
('20240813070506'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue