Merge branch 'pull/5207'

This commit is contained in:
Anton Khorev 2024-09-13 13:16:27 +03:00
commit 0423d18a8f
2 changed files with 15 additions and 0 deletions

View 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

View file

@ -3357,6 +3357,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('23'),
('22'),
('21'),
('20240912181413'),
('20240910175616'),
('20240822121603'),
('20240813070506'),