-- Try dropping common foreign key constraint names
-- Run these one by one until one works (ignore errors if constraint doesn't exist):

-- Try common naming patterns:
ALTER TABLE `bids` DROP FOREIGN KEY `bids_ibfk_1`;
ALTER TABLE `bids` DROP FOREIGN KEY `bids_ibfk_2`;
ALTER TABLE `bids` DROP FOREIGN KEY `bids_ibfk_3`;
ALTER TABLE `bids` DROP FOREIGN KEY `bids_ibfk_4`;

-- Try if foreign keys use column names:
ALTER TABLE `bids` DROP FOREIGN KEY `bids_inquiryId_foreign`;
ALTER TABLE `bids` DROP FOREIGN KEY `bids_supplierId_foreign`;
ALTER TABLE `bids` DROP FOREIGN KEY `bids_inquiryId_fk`;
ALTER TABLE `bids` DROP FOREIGN KEY `bids_supplierId_fk`;

-- Try if they use the index name:
ALTER TABLE `bids` DROP FOREIGN KEY `bids_inquiry_id_supplier_id`;

-- After successfully dropping the foreign key(s), then drop the index:
ALTER TABLE `bids` DROP INDEX `bids_inquiry_id_supplier_id`;

-- Then recreate foreign keys (optional):
ALTER TABLE `bids` 
  ADD CONSTRAINT `bids_inquiryId_fk` FOREIGN KEY (`inquiryId`) REFERENCES `inquiries` (`id`) ON DELETE CASCADE;

ALTER TABLE `bids` 
  ADD CONSTRAINT `bids_supplierId_fk` FOREIGN KEY (`supplierId`) REFERENCES `suppliers` (`id`) ON DELETE CASCADE;

