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