mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-21 05:09:15 +00:00
Use reference command
For uniformity Co-authored-by: Maikel <maikel@email.org.au>
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
class AddOwnerToSpreeVariants < ActiveRecord::Migration[7.1]
|
||||
def change
|
||||
add_column :spree_variants, :owner_id, :integer
|
||||
add_foreign_key :spree_variants, :enterprises, column: :owner_id
|
||||
add_reference :spree_variants, :owner, foreign_key: { to_table: :enterprises }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1009,7 +1009,8 @@ ActiveRecord::Schema[7.1].define(version: 2026_03_06_015040) do
|
||||
t.bigint "supplier_id"
|
||||
t.float "variant_unit_scale"
|
||||
t.string "variant_unit_name", limit: 255
|
||||
t.integer "owner_id"
|
||||
t.bigint "owner_id"
|
||||
t.index ["owner_id"], name: "index_spree_variants_on_owner_id"
|
||||
t.index ["primary_taxon_id"], name: "index_spree_variants_on_primary_taxon_id"
|
||||
t.index ["product_id"], name: "index_variants_on_product_id"
|
||||
t.index ["shipping_category_id"], name: "index_spree_variants_on_shipping_category_id"
|
||||
|
||||
Reference in New Issue
Block a user