Skip to content
Snippets Groups Projects
Verified Commit 54a1caeb authored by Imre Farkas's avatar Imre Farkas :palm_tree: Committed by Stan Hu
Browse files

No-op CleanupPersonalAccessTokensWithNilExpiresAt migration

parent 6a882032
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !158266. Comments created here will be created in the context of that merge request.
...@@ -7,16 +7,7 @@ module BackgroundMigration ...@@ -7,16 +7,7 @@ module BackgroundMigration
class CleanupPersonalAccessTokensWithNilExpiresAt < BatchedMigrationJob class CleanupPersonalAccessTokensWithNilExpiresAt < BatchedMigrationJob
feature_category :system_access feature_category :system_access
EXPIRES_AT_DEFAULT = 365.days.from_now def perform; end
scope_to ->(relation) { relation.where(expires_at: nil) }
operation_name :update_all
def perform
each_sub_batch do |sub_batch|
sub_batch.update_all(expires_at: EXPIRES_AT_DEFAULT)
end
end
end end
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment