#patch for shop module


#shop module requires register module and myaccount module is recommended, shop backend also needed
CREATE TABLE `shop` (
  `shopID` int(11) NOT NULL auto_increment,
  `name` varchar(120) default NULL,
  `company` int(11) default NULL,
  `deliveryMethodID` int(255) NOT NULL,
  PRIMARY KEY  (`shopID`),
  KEY `company` (`company`)
) ;
ALTER TABLE `shop` ADD `startingProductGroupID` int(11) DEFAULT NULL ;
ALTER TABLE `shop` ADD `email` varchar(255) DEFAULT NULL ;	--add to vc still

INSERT INTO `module` (`name`,`script`,`class`,`active`,`public`,`canreference`,`laymenInsert`) VALUES ('Shop','modules/shop/Shop.inc','Shop','1','1','0','0');

#patch for register module
CREATE TABLE `registerForm` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(255) NOT NULL,
`redirect` varchar(255) NOT NULL default '',
PRIMARY KEY  (`id`)
);
#changes for register form
ALTER TABLE `registerForm` ADD `company` int(11) NOT NULL;

CREATE TABLE `registerFormNotConfirmed` (
`id` int(11) NOT NULL auto_increment,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
PRIMARY KEY  (`id`)
) ;
INSERT INTO `module` ( `name` , `script` , `class` , `active` , `public` , `canreference` , `laymenInsert` )
VALUES ( 'Register Form', 'modules/registerForm/RegisterForm.inc', 'RegisterForm', '1', '1', '0', '0' );


#patch for myaccount module
INSERT INTO `module` (`name`,`script`,`class`,`active`,`public`,`canreference`,`laymenInsert`)
VALUES ('My Account','modules/myaccount/MyAccount.inc','MyAccount','1','1','0','0');

#patch for shop backend module
INSERT INTO `module` (`name`,`script`,`class`,`active`,`public`,`canreference`,`laymenInsert`)
VALUES ('Shop Backend','modules/shop/shopBackend.inc','ShopBackend','1','1','0','0');