Skip to content

Commit 709d60d

Browse files
committed
Fix migration typo (missing keyword foreign_key)
Also set `primary_taxon_id` column type to be integer to match `spree_taxons.id`
1 parent 7205ff0 commit 709d60d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class AddPrimaryTaxonToProducts < ActiveRecord::Migration[7.0]
22
def change
33
change_table :spree_products do |t|
4-
t.references :primary_taxon, { to_table: :spree_taxons }
4+
t.references :primary_taxon, type: :integer, foreign_key: { to_table: :spree_taxons }
55
end
66
end
77
end

0 commit comments

Comments
 (0)