mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
fixup: Drop spree_products_taxons join table
Make it reversible for dev or staging.
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
class RemoveProductTaxonsTable < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
drop_table :spree_products_taxons
|
||||
remove_foreign_key "spree_products_taxons", "spree_products", column: "product_id", name: "spree_products_taxons_product_id_fk", on_delete: :cascade
|
||||
remove_foreign_key "spree_products_taxons", "spree_taxons", column: "taxon_id", name: "spree_products_taxons_taxon_id_fk", on_delete: :cascade
|
||||
|
||||
drop_table :spree_products_taxons do |t|
|
||||
t.integer "product_id"
|
||||
t.integer "taxon_id"
|
||||
t.index ["product_id"], name: "index_products_taxons_on_product_id"
|
||||
t.index ["taxon_id"], name: "index_products_taxons_on_taxon_id"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user