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 $this->startSetup();
00029 $this->run("
00030 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote')}`;
00031 CREATE TABLE `{$installer->getTable('sales_quote')}` (
00032 `entity_id` int(10) unsigned NOT NULL auto_increment,
00033 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00034 `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
00035 `parent_id` int(10) unsigned NOT NULL default '0',
00036 `store_id` smallint(5) unsigned NOT NULL default '0',
00037 `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
00038 `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
00039 `converted_at` datetime NOT NULL default '0000-00-00 00:00:00',
00040
00041 `is_active` tinyint(1) unsigned NOT NULL default '1',
00042 `is_virtual` tinyint(1) unsigned NOT NULL default '0',
00043 `is_multi_shipping` tinyint(1) unsigned NOT NULL default '0',
00044 `is_multi_payment` tinyint(1) unsigned NOT NULL default '0',
00045 `customer_note_notify` tinyint(1) unsigned NOT NULL default '1',
00046 `customer_is_guest` tinyint(1) unsigned NOT NULL default '0',
00047
00048 `quote_status_id` int(10) unsigned NOT NULL,
00049 `billing_address_id` int(10) unsigned NOT NULL,
00050 `orig_order_id` int(10) unsigned NOT NULL,
00051 `customer_id` int(10) unsigned NOT NULL,
00052 `customer_tax_class_id` int(10) unsigned NOT NULL,
00053 `customer_group_id` int(10) unsigned NOT NULL,
00054 `items_count` int(10) unsigned NOT NULL,
00055
00056 `items_qty` decimal(12,4) NOT NULL default '0.0000',
00057 `store_to_base_rate` decimal(12,4) NOT NULL default '0.0000',
00058 `store_to_quote_rate` decimal(12,4) NOT NULL default '0.0000',
00059 `grand_total` decimal(12,4) NOT NULL default '0.0000',
00060 `base_grand_total` decimal(12,4) NOT NULL default '0.0000',
00061 `custbalance_amount` decimal(12,4) NOT NULL default '0.0000',
00062
00063 `checkout_method` varchar(255) NOT NULL default '',
00064 `password_hash` varchar(255) NOT NULL default '',
00065 `coupon_code` varchar(255) NOT NULL default '',
00066 `giftcert_code` varchar(255) NOT NULL default '',
00067 `base_currency_code` varchar(255) NOT NULL default '',
00068 `store_currency_code` varchar(255) NOT NULL default '',
00069 `quote_currency_code` varchar(255) NOT NULL default '',
00070 `customer_email` varchar(255) NOT NULL default '',
00071 `customer_firstname` varchar(255) NOT NULL default '',
00072 `customer_lastname` varchar(255) NOT NULL default '',
00073 `customer_note` varchar(255) NOT NULL default '',
00074 `remote_ip` varchar(255) NOT NULL default '',
00075 `applied_rule_ids` varchar(255) NOT NULL default '',
00076
00077
00078
00079 PRIMARY KEY (`entity_id`),
00080 KEY `FK_SALES_QUOTE_STORE` (`store_id`),
00081 CONSTRAINT `FK_SALES_QUOTE_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$installer->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00082 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00083
00084 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_decimal')}`;
00085 CREATE TABLE `{$installer->getTable('sales_quote_decimal')}` (
00086 `value_id` int(11) NOT NULL auto_increment,
00087 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00088 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00089 `entity_id` int(10) unsigned NOT NULL default '0',
00090 `value` decimal(12,4) NOT NULL default '0.0000',
00091 PRIMARY KEY (`value_id`),
00092 KEY `FK_SALES_QUOTE_DECIMAL_ENTITY_TYPE` (`entity_type_id`),
00093 KEY `FK_SALES_QUOTE_DECIMAL_ATTRIBUTE` (`attribute_id`),
00094 KEY `FK_SALES_QUOTE_DECIMAL` (`entity_id`),
00095 CONSTRAINT `FK_SALES_QUOTE_DECIMAL` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00096 CONSTRAINT `FK_SALES_QUOTE_DECIMAL_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00097 CONSTRAINT `FK_SALES_QUOTE_DECIMAL_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00098 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00099
00100 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_int')}`;
00101 CREATE TABLE `{$installer->getTable('sales_quote_int')}` (
00102 `value_id` int(11) NOT NULL auto_increment,
00103 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00104 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00105 `entity_id` int(10) unsigned NOT NULL default '0',
00106 `value` int(11) NOT NULL default '0',
00107 PRIMARY KEY (`value_id`),
00108 KEY `FK_SALES_QUOTE_INT_ENTITY_TYPE` (`entity_type_id`),
00109 KEY `FK_SALES_QUOTE_INT_ATTRIBUTE` (`attribute_id`),
00110 KEY `FK_SALES_QUOTE_INT` (`entity_id`),
00111 CONSTRAINT `FK_SALES_QUOTE_INT` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00112 CONSTRAINT `FK_SALES_QUOTE_INT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00113 CONSTRAINT `FK_SALES_QUOTE_INT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00114 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00115
00116 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_text')}`;
00117 CREATE TABLE `{$installer->getTable('sales_quote_text')}` (
00118 `value_id` int(11) NOT NULL auto_increment,
00119 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00120 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00121 `entity_id` int(10) unsigned NOT NULL default '0',
00122 `value` text NOT NULL,
00123 PRIMARY KEY (`value_id`),
00124 KEY `FK_SALES_QUOTE_TEXT_ENTITY_TYPE` (`entity_type_id`),
00125 KEY `FK_SALES_QUOTE_TEXT_ATTRIBUTE` (`attribute_id`),
00126 KEY `FK_SALES_QUOTE_TEXT` (`entity_id`),
00127 CONSTRAINT `FK_SALES_QUOTE_TEXT` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00128 CONSTRAINT `FK_SALES_QUOTE_TEXT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00129 CONSTRAINT `FK_SALES_QUOTE_TEXT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00130 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00131
00132 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_varchar')}`;
00133 CREATE TABLE `{$installer->getTable('sales_quote_varchar')}` (
00134 `value_id` int(11) NOT NULL auto_increment,
00135 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00136 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00137 `entity_id` int(10) unsigned NOT NULL default '0',
00138 `value` varchar(255) NOT NULL default '',
00139 PRIMARY KEY (`value_id`),
00140 KEY `FK_SALES_QUOTE_VARCHAR_ENTITY_TYPE` (`entity_type_id`),
00141 KEY `FK_SALES_QUOTE_VARCHAR_ATTRIBUTE` (`attribute_id`),
00142 KEY `FK_SALES_QUOTE_VARCHAR` (`entity_id`),
00143 CONSTRAINT `FK_SALES_QUOTE_VARCHAR` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00144 CONSTRAINT `FK_SALES_QUOTE_VARCHAR_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00145 CONSTRAINT `FK_SALES_QUOTE_VARCHAR_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00146 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00147
00148
00149 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_item')}`;
00150 CREATE TABLE `{$installer->getTable('sales_quote_item')}` (
00151 `entity_id` int(10) unsigned NOT NULL auto_increment,
00152 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00153 `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
00154 `parent_id` int(10) unsigned NOT NULL default '0',
00155 `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
00156 `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
00157
00158 `product_id` int(10) unsigned,
00159 `super_product_id` int(10) unsigned,
00160 `parent_product_id` int(10) unsigned,
00161
00162 `sku` varchar(255) NOT NULL default '',
00163 `name` varchar(255),
00164
00165 `description` text,
00166 `applied_rule_ids` text,
00167 `additional_data` text,
00168
00169 `free_shipping` tinyint(1) unsigned NOT NULL default '0',
00170 `is_qty_decimal` tinyint(1) unsigned,
00171 `no_discount` tinyint(1) unsigned default '0',
00172
00173 `weight` decimal(12,4) NOT NULL default '0.0000',
00174 `qty` decimal(12,4) NOT NULL default '0.0000',
00175 `price` decimal(12,4) NOT NULL default '0.0000',
00176 `discount_percent` decimal(12,4) NOT NULL default '0.0000',
00177 `discount_amount` decimal(12,4) NOT NULL default '0.0000',
00178 `tax_percent` decimal(12,4) NOT NULL default '0.0000',
00179 `tax_amount` decimal(12,4) NOT NULL default '0.0000',
00180 `row_total` decimal(12,4) NOT NULL default '0.0000',
00181 `row_total_with_discount` decimal(12,4) NOT NULL default '0.0000',
00182 `base_price` decimal(12,4) NOT NULL default '0.0000',
00183 `base_discount_amount` decimal(12,4) NOT NULL default '0.0000',
00184 `base_tax_amount` decimal(12,4) NOT NULL default '0.0000',
00185 `base_row_total` decimal(12,4) NOT NULL default '0.0000',
00186 `row_weight` decimal(12,4) NOT NULL default '0.0000',
00187 PRIMARY KEY (`entity_id`),
00188 CONSTRAINT `FK_SALES_QUOTE_ITEM_QUOTE` FOREIGN KEY (`parent_id`) REFERENCES `{$installer->getTable('sales_quote')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
00189 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00190
00191 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_item_decimal')}`;
00192 CREATE TABLE `{$installer->getTable('sales_quote_item_decimal')}` (
00193 `value_id` int(11) NOT NULL auto_increment,
00194 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00195 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00196 `entity_id` int(10) unsigned NOT NULL default '0',
00197 `value` decimal(12,4) NOT NULL default '0.0000',
00198 PRIMARY KEY (`value_id`),
00199 KEY `FK_SALES_QUOTE_ITEM_DECIMAL_ENTITY_TYPE` (`entity_type_id`),
00200 KEY `FK_SALES_QUOTE_ITEM_DECIMAL_ATTRIBUTE` (`attribute_id`),
00201 KEY `FK_SALES_QUOTE_ITEM_DECIMAL` (`entity_id`),
00202 CONSTRAINT `FK_SALES_QUOTE_ITEM_DECIMAL` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote_item')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00203 CONSTRAINT `FK_SALES_QUOTE_ITEM_DECIMAL_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00204 CONSTRAINT `FK_SALES_QUOTE_ITEM_DECIMAL_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00205 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00206
00207 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_item_int')}`;
00208 CREATE TABLE `{$installer->getTable('sales_quote_item_int')}` (
00209 `value_id` int(11) NOT NULL auto_increment,
00210 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00211 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00212 `entity_id` int(10) unsigned NOT NULL default '0',
00213 `value` int(11) NOT NULL default '0',
00214 PRIMARY KEY (`value_id`),
00215 KEY `FK_SALES_QUOTE_ITEM_INT_ENTITY_TYPE` (`entity_type_id`),
00216 KEY `FK_SALES_QUOTE_ITEM_INT_ATTRIBUTE` (`attribute_id`),
00217 KEY `FK_SALES_QUOTE_ITEM_INT` (`entity_id`),
00218 CONSTRAINT `FK_SALES_QUOTE_ITEM_INT` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote_item')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00219 CONSTRAINT `FK_SALES_QUOTE_ITEM_INT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00220 CONSTRAINT `FK_SALES_QUOTE_ITEM_INT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00221 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00222
00223 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_item_text')}`;
00224 CREATE TABLE `{$installer->getTable('sales_quote_item_text')}` (
00225 `value_id` int(11) NOT NULL auto_increment,
00226 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00227 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00228 `entity_id` int(10) unsigned NOT NULL default '0',
00229 `value` text NOT NULL,
00230 PRIMARY KEY (`value_id`),
00231 KEY `FK_SALES_QUOTE_ITEM_TEXT_ENTITY_TYPE` (`entity_type_id`),
00232 KEY `FK_SALES_QUOTE_ITEM_TEXT_ATTRIBUTE` (`attribute_id`),
00233 KEY `FK_SALES_QUOTE_ITEM_TEXT` (`entity_id`),
00234 CONSTRAINT `FK_SALES_QUOTE_ITEM_TEXT` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote_item')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00235 CONSTRAINT `FK_SALES_QUOTE_ITEM_TEXT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00236 CONSTRAINT `FK_SALES_QUOTE_ITEM_TEXT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00237 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00238
00239 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_item_varchar')}`;
00240 CREATE TABLE `{$installer->getTable('sales_quote_item_varchar')}` (
00241 `value_id` int(11) NOT NULL auto_increment,
00242 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00243 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00244 `entity_id` int(10) unsigned NOT NULL default '0',
00245 `value` varchar(255) NOT NULL default '',
00246 PRIMARY KEY (`value_id`),
00247 KEY `FK_SALES_QUOTE_ITEM_VARCHAR_ENTITY_TYPE` (`entity_type_id`),
00248 KEY `FK_SALES_QUOTE_ITEM_VARCHAR_ATTRIBUTE` (`attribute_id`),
00249 KEY `FK_SALES_QUOTE_ITEM_VARCHAR` (`entity_id`),
00250 CONSTRAINT `FK_SALES_QUOTE_ITEM_VARCHAR` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote_item')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00251 CONSTRAINT `FK_SALES_QUOTE_ITEM_VARCHAR_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00252 CONSTRAINT `FK_SALES_QUOTE_ITEM_VARCHAR_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00253 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_address')}`;
00266 CREATE TABLE `{$installer->getTable('sales_quote_address')}` (
00267 `entity_id` int(10) unsigned NOT NULL auto_increment,
00268 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00269 `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
00270 `parent_id` int(10) unsigned NOT NULL default '0',
00271 `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
00272 `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
00273
00274 `customer_id` int(10) unsigned,
00275 `customer_address_id` int(10) unsigned,
00276
00277 `address_type` varchar(255),
00278 `email` varchar(255),
00279 `firstname` varchar(255),
00280 `lastname` varchar(255),
00281 `company` varchar(255),
00282 `street` varchar(255),
00283 `city` varchar(255),
00284 `region` varchar(255),
00285 `region_id` int(10) unsigned,
00286 `postcode` varchar(255),
00287 `country_id` varchar(255),
00288 `telephone` varchar(255),
00289 `fax` varchar(255),
00290
00291 `same_as_billing` tinyint(1) unsigned NOT NULL default '0',
00292 `free_shipping` tinyint(1) unsigned NOT NULL default '0',
00293 `collect_shipping_rates` tinyint(1) unsigned NOT NULL default '0',
00294
00295 `shipping_method` varchar(255) NOT NULL default '',
00296 `shipping_description` varchar(255) NOT NULL default '',
00297
00298 `weight` decimal(12,4) NOT NULL default '0.0000',
00299 `subtotal` decimal(12,4) NOT NULL default '0.0000',
00300 `subtotal_with_discount` decimal(12,4) NOT NULL default '0.0000',
00301 `tax_amount` decimal(12,4) NOT NULL default '0.0000',
00302 `shipping_amount` decimal(12,4) NOT NULL default '0.0000',
00303 `discount_amount` decimal(12,4) NOT NULL default '0.0000',
00304 `custbalance_amount` decimal(12,4) NOT NULL default '0.0000',
00305 `grand_total` decimal(12,4) NOT NULL default '0.0000',
00306 `base_subtotal` decimal(12,4) NOT NULL default '0.0000',
00307 `base_subtotal_with_discount` decimal(12,4) NOT NULL default '0.0000',
00308 `base_tax_amount` decimal(12,4) NOT NULL default '0.0000',
00309 `base_shipping_amount` decimal(12,4) NOT NULL default '0.0000',
00310 `base_discount_amount` decimal(12,4) NOT NULL default '0.0000',
00311 `base_custbalance_amount` decimal(12,4) NOT NULL default '0.0000',
00312 `base_grand_total` decimal(12,4) NOT NULL default '0.0000',
00313
00314 `customer_notes` text,
00315
00316 PRIMARY KEY (`entity_id`),
00317 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_QUOTE` FOREIGN KEY (`parent_id`) REFERENCES `{$installer->getTable('sales_quote')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
00318 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00319
00320 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_address_decimal')}`;
00321 CREATE TABLE `{$installer->getTable('sales_quote_address_decimal')}` (
00322 `value_id` int(11) NOT NULL auto_increment,
00323 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00324 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00325 `entity_id` int(10) unsigned NOT NULL default '0',
00326 `value` decimal(12,4) NOT NULL default '0.0000',
00327 PRIMARY KEY (`value_id`),
00328 KEY `FK_SALES_QUOTE_ADDRESS_DECIMAL_ENTITY_TYPE` (`entity_type_id`),
00329 KEY `FK_SALES_QUOTE_ADDRESS_DECIMAL_ATTRIBUTE` (`attribute_id`),
00330 KEY `FK_SALES_QUOTE_ADDRESS_DECIMAL` (`entity_id`),
00331 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_DECIMAL` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote_address')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00332 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_DECIMAL_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00333 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_DECIMAL_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00334 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00335
00336 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_address_int')}`;
00337 CREATE TABLE `{$installer->getTable('sales_quote_address_int')}` (
00338 `value_id` int(11) NOT NULL auto_increment,
00339 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00340 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00341 `entity_id` int(10) unsigned NOT NULL default '0',
00342 `value` int(11) NOT NULL default '0',
00343 PRIMARY KEY (`value_id`),
00344 KEY `FK_SALES_QUOTE_ADDRESS_INT_ENTITY_TYPE` (`entity_type_id`),
00345 KEY `FK_SALES_QUOTE_ADDRESS_INT_ATTRIBUTE` (`attribute_id`),
00346 KEY `FK_SALES_QUOTE_ADDRESS_INT` (`entity_id`),
00347 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_INT` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote_address')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00348 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_INT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00349 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_INT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00350 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00351
00352 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_address_text')}`;
00353 CREATE TABLE `{$installer->getTable('sales_quote_address_text')}` (
00354 `value_id` int(11) NOT NULL auto_increment,
00355 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00356 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00357 `entity_id` int(10) unsigned NOT NULL default '0',
00358 `value` text NOT NULL,
00359 PRIMARY KEY (`value_id`),
00360 KEY `FK_SALES_QUOTE_ADDRESS_TEXT_ENTITY_TYPE` (`entity_type_id`),
00361 KEY `FK_SALES_QUOTE_ADDRESS_TEXT_ATTRIBUTE` (`attribute_id`),
00362 KEY `FK_SALES_QUOTE_ADDRESS_TEXT` (`entity_id`),
00363 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_TEXT` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote_address')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00364 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_TEXT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00365 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_TEXT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00366 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00367
00368 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_address_varchar')}`;
00369 CREATE TABLE `{$installer->getTable('sales_quote_address_varchar')}` (
00370 `value_id` int(11) NOT NULL auto_increment,
00371 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00372 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00373 `entity_id` int(10) unsigned NOT NULL default '0',
00374 `value` varchar(255) NOT NULL default '',
00375 PRIMARY KEY (`value_id`),
00376 KEY `FK_SALES_QUOTE_ADDRESS_VARCHAR_ENTITY_TYPE` (`entity_type_id`),
00377 KEY `FK_SALES_QUOTE_ADDRESS_VARCHAR_ATTRIBUTE` (`attribute_id`),
00378 KEY `FK_SALES_QUOTE_ADDRESS_VARCHAR` (`entity_id`),
00379 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_VARCHAR` FOREIGN KEY (`entity_id`) REFERENCES `{$installer->getTable('sales_quote_address')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00380 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_VARCHAR_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$installer->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00381 CONSTRAINT `FK_SALES_QUOTE_ADDRESS_VARCHAR_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$installer->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00382 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00383
00384 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_temp')}`;
00385 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_temp_datetime')}`;
00386 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_temp_decimal')}`;
00387 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_temp_int')}`;
00388 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_temp_text')}`;
00389 DROP TABLE IF EXISTS `{$installer->getTable('sales_quote_temp_varchar')}`;
00390 ");
00391 $this->endSetup();
00392 $this->installEntities();