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.

Add missing indexes on `spree_adjustments` to improve adjustment fetc… (#13107)

Damian Legawiec635ec4e268da
diff --git a/core/db/migrate/20250914101955_add_missing_indexes_on_spree_adjustments.rb b/core/db/migrate/20250914101955_add_missing_indexes_on_spree_adjustments.rb
new file mode 100644
index 0000000000..f07ba11810
--- /dev/null
+++ b/core/db/migrate/20250914101955_add_missing_indexes_on_spree_adjustments.rb
@@ -0,0 +1,6 @@
+class AddMissingIndexesOnSpreeAdjustments < ActiveRecord::Migration[7.2]
+ def change
+ add_index :spree_adjustments, :source_type, if_not_exists: true
+ add_index :spree_adjustments, :amount, if_not_exists: true
+ end
+end