ALTER TABLE `afp_door_win_prices` ADD COLUMN `InsulatedPrice` FLOAT(10,2) DEFAULT 0;
ALTER TABLE `choiceinfo` MODIFY `Image` VARCHAR(50);

ALTER TABLE `quotes_clients_nq` ADD COLUMN `RoofColor` SMALLINT(6) NULL DEFAULT NULL AFTER `Length`;
ALTER TABLE `quotes_clients_nq` ADD COLUMN `followUpEmailCount` INT(1) DEFAULT 0 AFTER `fromdomain`;
ALTER TABLE `quotes_clients_nq` ADD COLUMN `FtPanel` DECIMAL(8,2) DEFAULT 0 NULL AFTER `followUpEmailCount`;
ALTER TABLE `quotes_clients_nq` ADD COLUMN `EndEnclosure` VARCHAR(2) NULL DEFAULT NULL AFTER `FtPanel`;
ALTER TABLE `quotes_clients_nq` ADD COLUMN `EndEnclosurePrice` DECIMAL(8,2) DEFAULT 0 NULL AFTER `EndEnclosure`;
ALTER TABLE `quotes_clients_nq` ADD COLUMN `GableEnclosure` VARCHAR(2) NULL DEFAULT NULL AFTER `EndEnclosurePrice`;
ALTER TABLE `quotes_clients_nq` ADD COLUMN `GableEnclosurePrice` DECIMAL(8,2) DEFAULT 0 NULL AFTER `GableEnclosure`;
ALTER TABLE `quotes_clients_nq` ADD COLUMN `Lbsframe` DECIMAL(10,2) DEFAULT NULL;

ALTER TABLE `quotes_dealers_xd` ADD COLUMN `InsulationnrRolls` INT(2) NULL DEFAULT NULL;
ALTER TABLE `quotes_dealers_xd` ADD COLUMN `EndEnclosure` VARCHAR(2) NULL DEFAULT NULL;
ALTER TABLE `quotes_dealers_xd` ADD COLUMN `GableEnclosure` VARCHAR(2) NULL DEFAULT NULL;

ALTER TABLE `colors` ADD COLUMN `ColorCode` VARCHAR(45) NULL DEFAULT NULL AFTER `ColorName`;
UPDATE `colors` SET `ColorCode`='a74542' WHERE `ID`='3';
UPDATE `colors` SET `ColorCode`='9e2d33' WHERE `ID`='4';
UPDATE `colors` SET `ColorCode`='333945' WHERE `ID`='2';
UPDATE `colors` SET `ColorCode`='5f5754' WHERE `ID`='1';
UPDATE `colors` SET `ColorCode`='f1f7f7' WHERE `ID`='5';
UPDATE `colors` SET `ColorCode`='557991' WHERE `ID`='6';
UPDATE `colors` SET `ColorCode`='545b61' WHERE `ID`='7';
UPDATE `colors` SET `ColorCode`='5c2f46' WHERE `ID`='8';
UPDATE `colors` SET `ColorCode`='6e4644' WHERE `ID`='9';
UPDATE `colors` SET `ColorCode`='242752' WHERE `ID`='10';
UPDATE `colors` SET `ColorCode`='423443' WHERE `ID`='11';
UPDATE `colors` SET `ColorCode`='3d5e4d' WHERE `ID`='12';
UPDATE `colors` SET `ColorCode`='a9a491' WHERE `ID`='13';
UPDATE `colors` SET `ColorCode`='ffeccc' WHERE `ID`='14';
UPDATE `colors` SET `ColorCode`='919793' WHERE `ID`='15';
UPDATE `colors` SET `ColorCode`='ded9bc' WHERE `ID`='16';
UPDATE `colors` SET `ColorCode`='a1b99f' WHERE `ID`='17';
UPDATE `colors` SET `ColorCode`='c7af8d' WHERE `ID`='18';
UPDATE `colors` SET `ColorCode`='e5e7dc' WHERE `ID`='19';
UPDATE `colors` SET `ColorCode`='5f5754' WHERE `ID`='20';
UPDATE `colors` SET `ColorCode`='333945' WHERE `ID`='21';
UPDATE `colors` SET `ColorCode`='a74542' WHERE `ID`='22';
UPDATE `colors` SET `ColorCode`='9e2d33' WHERE `ID`='23';
UPDATE `colors` SET `ColorCode`='f1f7f7' WHERE `ID`='24';
UPDATE `colors` SET `ColorCode`='557991' WHERE `ID`='25';
UPDATE `colors` SET `ColorCode`='545b61' WHERE `ID`='26';
UPDATE `colors` SET `ColorCode`='5c2f46' WHERE `ID`='27';
UPDATE `colors` SET `ColorCode`='6e4644' WHERE `ID`='28';
UPDATE `colors` SET `ColorCode`='242752' WHERE `ID`='29';
UPDATE `colors` SET `ColorCode`='423443' WHERE `ID`='30';
UPDATE `colors` SET `ColorCode`='3d5e4d' WHERE `ID`='31';
UPDATE `colors` SET `ColorCode`='a9a491' WHERE `ID`='32';
UPDATE `colors` SET `ColorCode`='ffeccc' WHERE `ID`='33';
UPDATE `colors` SET `ColorCode`='919793' WHERE `ID`='34';
UPDATE `colors` SET `ColorCode`='ded9bc' WHERE `ID`='35';
UPDATE `colors` SET `ColorCode`='a1b99f' WHERE `ID`='36';
UPDATE `colors` SET `ColorCode`='c7af8d' WHERE `ID`='37';
UPDATE `colors` SET `ColorCode`='e5e7dc' WHERE `ID`='38';

ALTER TABLE `estOrderTable` ENGINE = InnoDB;
ALTER TABLE `estOrderTable` ADD COLUMN `PnlMfg` CHAR(150) DEFAULT NULL;
ALTER TABLE `estOrderDetails` ENGINE = InnoDB;
ALTER TABLE `estOrderDetails` ADD CONSTRAINT orderdetails_fk1 FOREIGN KEY (`OrderID`) REFERENCES `estOrderTable`(`OrderID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `estOrderListItems` ENGINE = InnoDB;
ALTER TABLE `estOrderListItems` ADD CONSTRAINT orderlistitems_fk1 FOREIGN KEY (`OrderID`) REFERENCES `estOrderTable`(`OrderID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `estOrderListPanels` ENGINE = InnoDB;
ALTER TABLE `estOrderListPanels` ADD CONSTRAINT orderlistpanels_fk1 FOREIGN KEY (`OrderID`) REFERENCES `estOrderTable`(`OrderID`) ON DELETE CASCADE ON UPDATE CASCADE;

CREATE TABLE `panel_db` (
  `part_nm` char(20) DEFAULT NULL,
  `group` char(60) DEFAULT NULL,
  `description` char(60) DEFAULT NULL,
  `price_type` char(5) DEFAULT NULL,
  `price_each` float DEFAULT NULL,
  `price_per_foot` float DEFAULT NULL,
  `price_per_S1` float DEFAULT NULL,
  `dealer_pct` float DEFAULT NULL,
  `retail_pct` float DEFAULT NULL,
  `cost_type` char(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;