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
00028 $installer = $this;
00029
00030
00031 $installer->startSetup();
00032 $installer->run("
00033 CREATE TABLE `{$installer->getTable('bundle/price_index')}` (
00034 `entity_id` int(10) unsigned NOT NULL,
00035 `website_id` smallint(5) unsigned NOT NULL,
00036 `customer_group_id` smallint(3) unsigned NOT NULL,
00037 `min_price` decimal(12,4) NOT NULL,
00038 `max_price` decimal(12,4) NOT NULL,
00039 PRIMARY KEY (`entity_id`,`website_id`,`customer_group_id`),
00040 KEY `IDX_WEBSITE` (`website_id`),
00041 KEY `IDX_CUSTOMER_GROUP` (`customer_group_id`),
00042 CONSTRAINT `CATALOG_PRODUCT_BUNDLE_PRICE_INDEX_CUSTOMER_GROUP` FOREIGN KEY (`customer_group_id`) REFERENCES `{$installer->getTable('customer/customer_group')}` (`customer_group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00043 CONSTRAINT `CATALOG_PRODUCT_BUNDLE_PRICE_INDEX_PRODUCT_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('catalog/product')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00044 CONSTRAINT `CATALOG_PRODUCT_BUNDLE_PRICE_INDEX_WEBSITE` FOREIGN KEY (`website_id`) REFERENCES `{$installer->getTable('core/website')}` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
00045 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00046 ");
00047 $installer->endSetup();