diff --git a/db/migrate/20230807145022_remove_product_taxons_table.rb b/db/migrate/20230807145022_remove_product_taxons_table.rb index 5b7d73a779..ec62363710 100644 --- a/db/migrate/20230807145022_remove_product_taxons_table.rb +++ b/db/migrate/20230807145022_remove_product_taxons_table.rb @@ -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