discourse/migrations/lib/importer
Selase Krakani a48f33fda0
FIX: Ensure copy_data callbacks run even when all rows are skipped (#33002)
Currently, if a batch "copy" of an import step results in all rows being
skipped, the `after_commit_of_skipped_rows` callback is never triggered.
This happens because the callback is nested inside a block that only
runs when at least one row is inserted.

This change ensures the DB copy operation returns both inserted and
skipped rows, allowing the caller to respond appropriately in either
case.

---------

Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2025-06-02 23:07:28 +02:00
..
steps DEV: Add converter & importer for permalink_normalizations 2025-05-31 22:17:44 +02:00
copy_step.rb FIX: Ensure copy_data callbacks run even when all rows are skipped (#33002) 2025-06-02 23:07:28 +02:00
discourse_db.rb FIX: Ensure copy_data callbacks run even when all rows are skipped (#33002) 2025-06-02 23:07:28 +02:00
executor.rb DEV: Adds a basic importer for the IntermediateDB 2025-04-07 17:22:36 +02:00
mapping_type.rb DEV: Adds a basic importer for the IntermediateDB 2025-04-07 17:22:36 +02:00
shared_data.rb DEV: Adds a basic importer for the IntermediateDB 2025-04-07 17:22:36 +02:00
step.rb DEV: Adds a basic importer for the IntermediateDB 2025-04-07 17:22:36 +02:00
step_stats.rb DEV: Adds a basic importer for the IntermediateDB 2025-04-07 17:22:36 +02:00
topological_sorter.rb DEV: Adds a basic importer for the IntermediateDB 2025-04-07 17:22:36 +02:00
unique_name_finder.rb DEV: Adds a basic importer for the IntermediateDB 2025-04-07 17:22:36 +02:00