00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 $installer = $this;
00028
00029
00030 $installer->startSetup();
00031
00032 $installer->run("
00033
00034 -- DROP TABLE IF EXISTS {$this->getTable('wishlist')};
00035 CREATE TABLE {$this->getTable('wishlist')} (
00036 `wishlist_id` int(10) unsigned NOT NULL auto_increment,
00037 `customer_id` int(10) unsigned NOT NULL default '0',
00038 `shared` tinyint(1) unsigned default '0',
00039 `sharing_code` varchar(32) character set latin1 collate latin1_general_ci NOT NULL default '',
00040 PRIMARY KEY (`wishlist_id`),
00041 UNIQUE KEY `FK_CUSTOMER` (`customer_id`)
00042 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Wishlist main';
00043
00044 -- DROP TABLE IF EXISTS {$this->getTable('wishlist_item')};
00045 CREATE TABLE {$this->getTable('wishlist_item')} (
00046 `wishlist_item_id` int(10) unsigned NOT NULL auto_increment,
00047 `wishlist_id` int(10) unsigned NOT NULL default '0',
00048 `product_id` int(10) unsigned NOT NULL default '0',
00049 `store_id` int(10) unsigned NOT NULL default '0',
00050 `added_at` datetime default NULL,
00051 `description` text,
00052 PRIMARY KEY (`wishlist_item_id`),
00053 KEY `FK_ITEM_WISHLIST` (`wishlist_id`),
00054 KEY `FK_WISHLIST_PRODUCT` (`product_id`),
00055 KEY `FK_WISHLIST_STORE` (`store_id`),
00056 CONSTRAINT `FK_ITEM_WISHLIST` FOREIGN KEY (`wishlist_id`) REFERENCES {$this->getTable('wishlist')} (`wishlist_id`) ON DELETE CASCADE ON UPDATE CASCADE
00057 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Wishlist items';
00058
00059 ");
00060
00061 $installer->endSetup();