Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

FIX csv importer index (#13354)

brozekb74695e70f4c
diff --git a/core/app/jobs/spree/imports/create_rows_job.rb b/core/app/jobs/spree/imports/create_rows_job.rb
index ff8ae63b15..1481d05594 100644
--- a/core/app/jobs/spree/imports/create_rows_job.rb
+++ b/core/app/jobs/spree/imports/create_rows_job.rb
@@ -31,7 +31,7 @@ module Spree
upsert_options = {}
if %w[PostgreSQL SQLite].include?(ActiveRecord::Base.connection.adapter_name)
- upsert_options[:unique_by] = %i[import_id row_number]
+ upsert_options[:unique_by] = :index_spree_import_rows_on_import_id_and_row_number
end
# NOTE: Ensure a DB-level unique index on [:import_id, :row_number] for all adapters.