DELETE FROM `ei_Settings` WHERE `ei_Settings`.`name` = 'materialComparisonButton';

INSERT INTO `ei_DPageItemType` (`id`, `type`, `title`, `sorter`) VALUES ('44', 'ECommerce_Product_Category_TypeInStock_', 'InStock Product Categories List', '175'); 

--
-- CREATE ei_SignShape
--
CREATE TABLE IF NOT EXISTS `ei_SignShape` (
  `id` int(11) unsigned NOT NULL,
  `title` varchar(255) NOT NULL,
  `image` varchar(255) NOT NULL,
  `sorter` int(10) unsigned NOT NULL DEFAULT '0',
  `added` datetime NOT NULL,
  `changed` datetime NOT NULL
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

ALTER TABLE `ei_SignShape`
 ADD PRIMARY KEY (`id`), ADD KEY `sorter` (`sorter`);

ALTER TABLE `ei_SignShape`
MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1;

--
-- CREATE ei_ProductCategory2SignShape
--

CREATE TABLE IF NOT EXISTS `ei_ProductCategory2SignShape` (
  `categoryId` int(11) NOT NULL,
  `signShapeId` int(10) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `ei_ProductCategory2SignShape`
 ADD PRIMARY KEY (`categoryId`,`signShapeId`), ADD KEY `signShapeId` (`signShapeId`);

ALTER TABLE `ei_ProductCategory2SignShape`
ADD CONSTRAINT `ei_ProductCategory2SignShape_ibfk_1` FOREIGN KEY (`categoryId`) REFERENCES `ei_ProductCategory` (`id`),
ADD CONSTRAINT `ei_ProductCategory2SignShape_ibfk_2` FOREIGN KEY (`signShapeId`) REFERENCES `ei_SignShape` (`id`);

--
-- UPDATE ei_Product
--
ALTER TABLE `ei_Product` ADD `shapeId` INT(10) UNSIGNED NOT NULL AFTER `colorId`, ADD INDEX (`shapeId`) ;
--- ALTER TABLE `ei_Product` ADD CONSTRAINT `ei_Product_ibfk_4` FOREIGN KEY (`shapeId`) REFERENCES `ei_SignShape` (`id`);
