-- QUICK FIX: Remove unique constraint to allow multiple bids per supplier
-- Run this in phpMyAdmin SQL tab

-- Step 1: Find the unique index
SHOW INDEX FROM `bids` WHERE Column_name IN ('inquiryId', 'supplierId') AND Non_unique = 0;

-- Step 2: Drop the unique index (replace INDEX_NAME with the Key_name from Step 1)
-- Common names: 'bids_inquiryId_supplierId', 'inquiryId_supplierId', etc.
-- Try these one by one:

ALTER TABLE `bids` DROP INDEX `bids_inquiryId_supplierId`;
-- If the above fails, try:
-- ALTER TABLE `bids` DROP INDEX `inquiryId_supplierId`;
-- Or use the exact name from Step 1

-- Step 3: Create non-unique index (allows duplicates)
CREATE INDEX `idx_bids_inquiry_supplier` ON `bids` (`inquiryId`, `supplierId`);

-- Step 4: Verify
SHOW INDEX FROM `bids` WHERE Column_name IN ('inquiryId', 'supplierId');
-- Should show Non_unique = 1 (allows duplicates)

