Skip to content

Commit

Permalink
Backfill the significantly_updated_at from updated_at
Browse files Browse the repository at this point in the history
We want to backfill the `significantly_updated_at` using the `updated_at`
attribute of each user.
  • Loading branch information
ethax-ross authored and cwrw committed Nov 22, 2024
1 parent de465d7 commit ec39f08
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class BackfillSignificantlyUpdatedAt < ActiveRecord::Migration[7.1]
def up
User.in_batches do |batch|
batch.update_all("significantly_updated_at = updated_at")
end
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2024_11_20_082433) do
ActiveRecord::Schema[7.1].define(version: 2024_11_22_155145) do
# These are extensions that must be enabled in order to support this database
enable_extension "btree_gin"
enable_extension "citext"
Expand Down

0 comments on commit ec39f08

Please sign in to comment.