discourse/migrations/lib/importer
Selase Krakani d304e708be
FIX: Stop silently dropping first two rows during load_mapping (#33076)
Currently, the first two rows returned by `DiscourseDB#query_array` are
silently dropped during the column size check in
`DiscourseDB#load_mapping`. This happens because the rows object, while
an enumerator, isn't fully compliant, it doesn't rewind during
introspection. As a result, calls like `#first`, `#peek`, or `#any?`
advance the iterator.

Ideally, we’d fix this by updating the `query_array` enumeration
implementation. However, customizing the enumerator to be fully
compliant would likely introduce unnecessary perf overhead for all use
cases. So, this fix works around that limitation by building the map a
little differently.
2025-06-09 23:26:59 +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 FIX: Stop silently dropping first two rows during load_mapping (#33076) 2025-06-09 23:26:59 +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