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 index on locale and permalink to taxon translations

Rafal Cymerys3f07e5b46b0d
diff --git a/core/db/migrate/20230514162157_add_index_on_locale_and_permalink_to_spree_taxons.rb b/core/db/migrate/20230514162157_add_index_on_locale_and_permalink_to_spree_taxons.rb
new file mode 100644
index 0000000000..b352b8ad16
--- /dev/null
+++ b/core/db/migrate/20230514162157_add_index_on_locale_and_permalink_to_spree_taxons.rb
@@ -0,0 +1,5 @@
+class AddIndexOnLocaleAndPermalinkToSpreeTaxons < ActiveRecord::Migration[6.1]
+ def change
+ add_index :spree_taxon_translations, [:locale, :permalink], unique: true, name: 'unique_permalink_per_locale', if_not_exists: true
+ end
+end