-- Alternative approach: Modify columns to remove foreign keys, then drop index
-- This might work if foreign keys are defined inline

-- STEP 1: Try to modify the columns (this might drop inline foreign keys)
-- WARNING: This might fail if there are foreign key constraints
-- But it's worth trying:

ALTER TABLE `bids` 
  MODIFY COLUMN `inquiryId` INT NOT NULL,
  MODIFY COLUMN `supplierId` INT NOT NULL;

-- STEP 2: Now try dropping the index
ALTER TABLE `bids` DROP INDEX `bids_inquiry_id_supplier_id`;

-- STEP 3: Recreate foreign keys explicitly
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 4: Verify
SHOW INDEX FROM `bids` WHERE Column_name IN ('inquiryId', 'supplierId`);

