Skip to content

Commit

Permalink
Do not generate invalid background data migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
fatkodima committed Jan 29, 2025
1 parent 02a0445 commit e8fb498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/generators/online_migrations/templates/migration.rb.tt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class Enqueue<%= class_name %> < <%= migration_parent %>
def up
enqueue_background_data_migration("<%= class_name %>", ...args)
enqueue_background_data_migration("<%= class_name %>")
end

def down
# Make sure to pass the same arguments as in the "up" method, if any.
remove_background_data_migration("<%= class_name %>", ...args)
remove_background_data_migration("<%= class_name %>")
end
end

0 comments on commit e8fb498

Please sign in to comment.