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 CREATE TABLE {$installer->getTable('weee_tax')} (
00034 `value_id` int(11) NOT NULL auto_increment,
00035 `website_id` smallint(5) unsigned NOT NULL default '0',
00036 `entity_id` int(10) unsigned NOT NULL default '0',
00037 `country` varchar(2) NOT NULL default '',
00038 `value` decimal(12,4) NOT NULL default '0.0000',
00039 PRIMARY KEY (`value_id`),
00040 KEY `FK_CATALOG_PRODUCT_ENTITY_WEEE_TAX_WEBSITE` (`website_id`),
00041 KEY `FK_CATALOG_PRODUCT_ENTITY_WEEE_TAX_PRODUCT_ENTITY` (`entity_id`),
00042 KEY `FK_CATALOG_PRODUCT_ENTITY_WEEE_TAX_COUNTRY` (`country`),
00043 CONSTRAINT `FK_CATALOG_PRODUCT_ENTITY_WEEE_TAX_PRODUCT_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('catalog_product_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00044 CONSTRAINT `FK_CATALOG_PRODUCT_ENTITY_WEEE_TAX_WEBSITE` FOREIGN KEY (`website_id`) REFERENCES {$this->getTable('core_website')} (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00045 CONSTRAINT `FK_CATALOG_PRODUCT_ENTITY_WEEE_TAX_COUNTRY` FOREIGN KEY (`country`) REFERENCES {$this->getTable('directory_country')} (`country_id`) ON DELETE CASCADE ON UPDATE CASCADE
00046 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00047 ");
00048
00049 $installer->endSetup();