-- Complete solution using SHOW CREATE TABLE
-- Follow these steps:

-- STEP 1: Get the table structure
SHOW CREATE TABLE `bids`;

-- STEP 2: In the output, find lines like:
--   CONSTRAINT `FK_NAME` FOREIGN KEY (`inquiryId`) REFERENCES `inquiries` (`id`)
--   CONSTRAINT `FK_NAME` FOREIGN KEY (`supplierId`) REFERENCES `suppliers` (`id`)
-- Note the FK_NAME values

-- STEP 3: Drop the foreign keys (replace FK_NAME with actual names from Step 2)
-- ALTER TABLE `bids` DROP FOREIGN KEY `FK_NAME_FOR_INQUIRYID`;
-- ALTER TABLE `bids` DROP FOREIGN KEY `FK_NAME_FOR_SUPPLIERID`;

-- STEP 4: Drop the unique index
ALTER TABLE `bids` DROP INDEX `bids_inquiry_id_supplier_id`;

-- STEP 5: Recreate foreign keys (optional - for data integrity)
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;

-- STEP 6: Verify
SHOW INDEX FROM `bids` WHERE Column_name IN ('inquiryId', 'supplierId');
-- Should only see Non_unique = 1

