-- Add warranty and condition fields to bids table
-- Run this migration to add warranty and condition information to supplier bids

ALTER TABLE `bids` 
ADD COLUMN `warrantyAvailable` BOOLEAN DEFAULT FALSE NULL AFTER `notes`,
ADD COLUMN `warrantyPeriod` INT NULL AFTER `warrantyAvailable`,
ADD COLUMN `condition` ENUM('brand_new', 'used') NULL AFTER `warrantyPeriod`;

-- Add comments for clarity
ALTER TABLE `bids` 
MODIFY COLUMN `warrantyAvailable` BOOLEAN DEFAULT FALSE NULL COMMENT 'Whether warranty is available for this part',
MODIFY COLUMN `warrantyPeriod` INT NULL COMMENT 'Warranty period in months (only if warrantyAvailable is true)',
MODIFY COLUMN `condition` ENUM('brand_new', 'used') NULL COMMENT 'Condition of the spare part';

