From dd0907addda37ad94f1a62dd06b68a8fd4d8f30b Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Fri, 30 May 2014 11:24:16 +1000 Subject: [PATCH] Adding back the primary taxon migration --- db/migrate/20140522044009_add_primary_taxon_to_products.rb | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 db/migrate/20140522044009_add_primary_taxon_to_products.rb diff --git a/db/migrate/20140522044009_add_primary_taxon_to_products.rb b/db/migrate/20140522044009_add_primary_taxon_to_products.rb new file mode 100644 index 0000000000..f6ff3cfe96 --- /dev/null +++ b/db/migrate/20140522044009_add_primary_taxon_to_products.rb @@ -0,0 +1,7 @@ +class AddPrimaryTaxonToProducts < ActiveRecord::Migration + def change + add_column :spree_products, :primary_taxon_id, :integer + add_index :spree_products, :primary_taxon_id + add_foreign_key :spree_products, :spree_taxons, column: :primary_taxon_id + end +end