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 /*Table structure for table `sales_counter` */
00035
00036 -- DROP TABLE IF EXISTS {$this->getTable('sales_counter')};
00037 CREATE TABLE {$this->getTable('sales_counter')} (
00038 `counter_id` int(10) unsigned NOT NULL auto_increment,
00039 `store_id` int(10) unsigned NOT NULL default '0',
00040 `counter_type` varchar(50) NOT NULL default '',
00041 `counter_value` varchar(50) NOT NULL default '',
00042 PRIMARY KEY (`counter_id`),
00043 UNIQUE KEY `store_id` (`store_id`,`counter_type`)
00044 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00045
00046 /*Data for the table `sales_counter` */
00047
00048 /*Table structure for table `sales_discount_coupon` */
00049
00050 -- DROP TABLE IF EXISTS {$this->getTable('sales_discount_coupon')};
00051
00052 CREATE TABLE {$this->getTable('sales_discount_coupon')} (
00053 `coupon_id` int(10) unsigned NOT NULL auto_increment,
00054 `coupon_code` varchar(50) NOT NULL default '',
00055 `discount_percent` decimal(10,4) NOT NULL default '0.0000',
00056 `discount_fixed` decimal(10,4) NOT NULL default '0.0000',
00057 `is_active` tinyint(1) NOT NULL default '1',
00058 `from_date` datetime NOT NULL default '0000-00-00 00:00:00',
00059 `to_date` datetime NOT NULL default '0000-00-00 00:00:00',
00060 `min_subtotal` decimal(12,4) NOT NULL default '0.0000',
00061 `limit_products` text NOT NULL,
00062 `limit_categories` text NOT NULL,
00063 `limit_attributes` text NOT NULL,
00064 PRIMARY KEY (`coupon_id`)
00065 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00066
00067 /*Data for the table `sales_discount_coupon` */
00068
00069 insert into {$this->getTable('sales_discount_coupon')}(`coupon_id`,`coupon_code`,`discount_percent`,`discount_fixed`,`is_active`,`from_date`,`to_date`,`min_subtotal`,`limit_products`,`limit_categories`,`limit_attributes`) values (1,'test',10.0000,0.0000,1,'0000-00-00 00:00:00','0000-00-00 00:00:00',0.0000,'','','');
00070
00071 /*Table structure for table `sales_giftcert` */
00072
00073 -- DROP TABLE IF EXISTS {$this->getTable('sales_giftcert')};
00074
00075 CREATE TABLE {$this->getTable('sales_giftcert')} (
00076 `giftcert_id` int(10) unsigned NOT NULL auto_increment,
00077 `giftcert_code` varchar(50) NOT NULL default '',
00078 `balance_amount` decimal(12,4) NOT NULL default '0.0000',
00079 PRIMARY KEY (`giftcert_id`),
00080 UNIQUE KEY `gift_code` (`giftcert_code`)
00081 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00082
00083 /*Data for the table `sales_giftcert` */
00084
00085 insert into {$this->getTable('sales_giftcert')}(`giftcert_id`,`giftcert_code`,`balance_amount`) values (1,'test',20.0000);
00086
00087 /*Table structure for table `sales_invoice_entity` */
00088
00089 -- DROP TABLE IF EXISTS {$this->getTable('sales_invoice_entity')};
00090
00091 CREATE TABLE {$this->getTable('sales_invoice_entity')} (
00092 `entity_id` int(10) unsigned NOT NULL auto_increment,
00093 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00094 `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
00095 `increment_id` varchar(50) NOT NULL default '',
00096 `parent_id` int(10) unsigned NOT NULL default '0',
00097 `store_id` smallint(5) unsigned NOT NULL default '0',
00098 `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
00099 `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
00100 `is_active` tinyint(1) unsigned NOT NULL default '1',
00101 PRIMARY KEY (`entity_id`),
00102 KEY `FK_sales_invoice_entity_type` (`entity_type_id`),
00103 KEY `FK_sales_invoice_entity_store` (`store_id`),
00104 CONSTRAINT `FK_sales_invoice_entity_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00105 CONSTRAINT `FK_sales_invoice_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00106 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00107
00108 /*Data for the table `sales_invoice_entity` */
00109
00110 /*Table structure for table `sales_invoice_entity_datetime` */
00111
00112 -- DROP TABLE IF EXISTS {$this->getTable('sales_invoice_entity_datetime')};
00113 CREATE TABLE {$this->getTable('sales_invoice_entity_datetime')} (
00114 `value_id` int(11) NOT NULL auto_increment,
00115 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00116 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00117 `store_id` smallint(5) unsigned NOT NULL default '0',
00118 `entity_id` int(10) unsigned NOT NULL default '0',
00119 `value` datetime NOT NULL default '0000-00-00 00:00:00',
00120 PRIMARY KEY (`value_id`),
00121 KEY `FK_sales_invoice_entity_datetime_entity_type` (`entity_type_id`),
00122 KEY `FK_sales_invoice_entity_datetime_attribute` (`attribute_id`),
00123 KEY `FK_sales_invoice_entity_datetime_store` (`store_id`),
00124 KEY `FK_sales_invoice_entity_datetime` (`entity_id`),
00125 CONSTRAINT `FK_sales_invoice_entity_datetime` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_invoice_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00126 CONSTRAINT `FK_sales_invoice_entity_datetime_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00127 CONSTRAINT `FK_sales_invoice_entity_datetime_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00128 CONSTRAINT `FK_sales_invoice_entity_datetime_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00129 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00130
00131 /*Data for the table `sales_invoice_entity_datetime` */
00132
00133 /*Table structure for table `sales_invoice_entity_decimal` */
00134
00135 -- DROP TABLE IF EXISTS {$this->getTable('sales_invoice_entity_decimal')};
00136
00137 CREATE TABLE {$this->getTable('sales_invoice_entity_decimal')} (
00138 `value_id` int(11) NOT NULL auto_increment,
00139 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00140 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00141 `store_id` smallint(5) unsigned NOT NULL default '0',
00142 `entity_id` int(10) unsigned NOT NULL default '0',
00143 `value` decimal(12,4) NOT NULL default '0.0000',
00144 PRIMARY KEY (`value_id`),
00145 KEY `FK_sales_invoice_entity_decimal_entity_type` (`entity_type_id`),
00146 KEY `FK_sales_invoice_entity_decimal_attribute` (`attribute_id`),
00147 KEY `FK_sales_invoice_entity_decimal_store` (`store_id`),
00148 KEY `FK_sales_invoice_entity_decimal` (`entity_id`),
00149 CONSTRAINT `FK_sales_invoice_entity_decimal` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_invoice_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00150 CONSTRAINT `FK_sales_invoice_entity_decimal_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00151 CONSTRAINT `FK_sales_invoice_entity_decimal_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00152 CONSTRAINT `FK_sales_invoice_entity_decimal_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00153 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00154
00155 /*Data for the table `sales_invoice_entity_decimal` */
00156
00157 /*Table structure for table `sales_invoice_entity_int` */
00158
00159 -- DROP TABLE IF EXISTS {$this->getTable('sales_invoice_entity_int')};
00160
00161 CREATE TABLE {$this->getTable('sales_invoice_entity_int')} (
00162 `value_id` int(11) NOT NULL auto_increment,
00163 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00164 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00165 `store_id` smallint(5) unsigned NOT NULL default '0',
00166 `entity_id` int(10) unsigned NOT NULL default '0',
00167 `value` int(11) NOT NULL default '0',
00168 PRIMARY KEY (`value_id`),
00169 KEY `FK_sales_invoice_entity_int_entity_type` (`entity_type_id`),
00170 KEY `FK_sales_invoice_entity_int_attribute` (`attribute_id`),
00171 KEY `FK_sales_invoice_entity_int_store` (`store_id`),
00172 KEY `FK_sales_invoice_entity_int` (`entity_id`),
00173 CONSTRAINT `FK_sales_invoice_entity_int` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_invoice_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00174 CONSTRAINT `FK_sales_invoice_entity_int_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00175 CONSTRAINT `FK_sales_invoice_entity_int_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00176 CONSTRAINT `FK_sales_invoice_entity_int_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00177 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00178
00179 /*Data for the table `sales_invoice_entity_int` */
00180
00181 /*Table structure for table `sales_invoice_entity_text` */
00182
00183 -- DROP TABLE IF EXISTS {$this->getTable('sales_invoice_entity_text')};
00184 CREATE TABLE {$this->getTable('sales_invoice_entity_text')} (
00185 `value_id` int(11) NOT NULL auto_increment,
00186 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00187 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00188 `store_id` smallint(5) unsigned NOT NULL default '0',
00189 `entity_id` int(10) unsigned NOT NULL default '0',
00190 `value` text NOT NULL,
00191 PRIMARY KEY (`value_id`),
00192 KEY `FK_sales_invoice_entity_text_entity_type` (`entity_type_id`),
00193 KEY `FK_sales_invoice_entity_text_attribute` (`attribute_id`),
00194 KEY `FK_sales_invoice_entity_text_store` (`store_id`),
00195 KEY `FK_sales_invoice_entity_text` (`entity_id`),
00196 CONSTRAINT `FK_sales_invoice_entity_text` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_invoice_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00197 CONSTRAINT `FK_sales_invoice_entity_text_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00198 CONSTRAINT `FK_sales_invoice_entity_text_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00199 CONSTRAINT `FK_sales_invoice_entity_text_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00200 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00201
00202 /*Data for the table `sales_invoice_entity_text` */
00203
00204 /*Table structure for table `sales_invoice_entity_varchar` */
00205
00206 -- DROP TABLE IF EXISTS {$this->getTable('sales_invoice_entity_varchar')};
00207 CREATE TABLE {$this->getTable('sales_invoice_entity_varchar')} (
00208 `value_id` int(11) NOT NULL auto_increment,
00209 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00210 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00211 `store_id` smallint(5) unsigned NOT NULL default '0',
00212 `entity_id` int(10) unsigned NOT NULL default '0',
00213 `value` varchar(255) NOT NULL default '',
00214 PRIMARY KEY (`value_id`),
00215 KEY `FK_sales_invoice_entity_varchar_entity_type` (`entity_type_id`),
00216 KEY `FK_sales_invoice_entity_varchar_attribute` (`attribute_id`),
00217 KEY `FK_sales_invoice_entity_varchar_store` (`store_id`),
00218 KEY `FK_sales_invoice_entity_varchar` (`entity_id`),
00219 CONSTRAINT `FK_sales_invoice_entity_varchar` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_invoice_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00220 CONSTRAINT `FK_sales_invoice_entity_varchar_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00221 CONSTRAINT `FK_sales_invoice_entity_varchar_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00222 CONSTRAINT `FK_sales_invoice_entity_varchar_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00223 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00224
00225 /*Data for the table `sales_invoice_entity_varchar` */
00226
00227 /*Table structure for table `sales_order_entity` */
00228
00229 -- DROP TABLE IF EXISTS {$this->getTable('sales_order_entity')};
00230 CREATE TABLE {$this->getTable('sales_order_entity')} (
00231 `entity_id` int(10) unsigned NOT NULL auto_increment,
00232 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00233 `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
00234 `increment_id` varchar(50) NOT NULL default '',
00235 `parent_id` int(10) unsigned NOT NULL default '0',
00236 `store_id` smallint(5) unsigned NOT NULL default '0',
00237 `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
00238 `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
00239 `is_active` tinyint(1) unsigned NOT NULL default '1',
00240 PRIMARY KEY (`entity_id`),
00241 KEY `FK_sales_order_entity_type` (`entity_type_id`),
00242 KEY `FK_sales_order_entity_store` (`store_id`),
00243 CONSTRAINT `FK_sales_order_entity_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00244 CONSTRAINT `FK_sales_order_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00245 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
00246
00247 /*Data for the table `sales_order_entity` */
00248
00249 /*Table structure for table `sales_order_entity_datetime` */
00250
00251 -- DROP TABLE IF EXISTS {$this->getTable('sales_order_entity_datetime')};
00252 CREATE TABLE {$this->getTable('sales_order_entity_datetime')} (
00253 `value_id` int(11) NOT NULL auto_increment,
00254 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00255 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00256 `store_id` smallint(5) unsigned NOT NULL default '0',
00257 `entity_id` int(10) unsigned NOT NULL default '0',
00258 `value` datetime NOT NULL default '0000-00-00 00:00:00',
00259 PRIMARY KEY (`value_id`),
00260 KEY `FK_sales_order_entity_datetime_entity_type` (`entity_type_id`),
00261 KEY `FK_sales_order_entity_datetime_attribute` (`attribute_id`),
00262 KEY `FK_sales_order_entity_datetime_store` (`store_id`),
00263 KEY `FK_sales_order_entity_datetime` (`entity_id`),
00264 CONSTRAINT `FK_sales_order_entity_datetime` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_order_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00265 CONSTRAINT `FK_sales_order_entity_datetime_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00266 CONSTRAINT `FK_sales_order_entity_datetime_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00267 CONSTRAINT `FK_sales_order_entity_datetime_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00268 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00269
00270 /*Data for the table `sales_order_entity_datetime` */
00271
00272 /*Table structure for table `sales_order_entity_decimal` */
00273
00274 -- DROP TABLE IF EXISTS {$this->getTable('sales_order_entity_decimal')};
00275 CREATE TABLE {$this->getTable('sales_order_entity_decimal')} (
00276 `value_id` int(11) NOT NULL auto_increment,
00277 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00278 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00279 `store_id` smallint(5) unsigned NOT NULL default '0',
00280 `entity_id` int(10) unsigned NOT NULL default '0',
00281 `value` decimal(12,4) NOT NULL default '0.0000',
00282 PRIMARY KEY (`value_id`),
00283 KEY `FK_sales_order_entity_decimal_entity_type` (`entity_type_id`),
00284 KEY `FK_sales_order_entity_decimal_attribute` (`attribute_id`),
00285 KEY `FK_sales_order_entity_decimal_store` (`store_id`),
00286 KEY `FK_sales_order_entity_decimal` (`entity_id`),
00287 CONSTRAINT `FK_sales_order_entity_decimal` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_order_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00288 CONSTRAINT `FK_sales_order_entity_decimal_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00289 CONSTRAINT `FK_sales_order_entity_decimal_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00290 CONSTRAINT `FK_sales_order_entity_decimal_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00291 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00292
00293 /*Data for the table `sales_order_entity_decimal` */
00294
00295 /*Table structure for table `sales_order_entity_int` */
00296
00297 -- DROP TABLE IF EXISTS {$this->getTable('sales_order_entity_int')};
00298 CREATE TABLE {$this->getTable('sales_order_entity_int')} (
00299 `value_id` int(11) NOT NULL auto_increment,
00300 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00301 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00302 `store_id` smallint(5) unsigned NOT NULL default '0',
00303 `entity_id` int(10) unsigned NOT NULL default '0',
00304 `value` int(11) NOT NULL default '0',
00305 PRIMARY KEY (`value_id`),
00306 KEY `FK_sales_order_entity_int_entity_type` (`entity_type_id`),
00307 KEY `FK_sales_order_entity_int_attribute` (`attribute_id`),
00308 KEY `FK_sales_order_entity_int_store` (`store_id`),
00309 KEY `FK_sales_order_entity_int` (`entity_id`),
00310 CONSTRAINT `FK_sales_order_entity_int` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_order_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00311 CONSTRAINT `FK_sales_order_entity_int_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00312 CONSTRAINT `FK_sales_order_entity_int_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00313 CONSTRAINT `FK_sales_order_entity_int_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00314 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00315
00316 /*Data for the table `sales_order_entity_int` */
00317
00318 /*Table structure for table `sales_order_entity_text` */
00319
00320 -- DROP TABLE IF EXISTS {$this->getTable('sales_order_entity_text')};
00321 CREATE TABLE {$this->getTable('sales_order_entity_text')} (
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 `store_id` smallint(5) unsigned NOT NULL default '0',
00326 `entity_id` int(10) unsigned NOT NULL default '0',
00327 `value` text NOT NULL,
00328 PRIMARY KEY (`value_id`),
00329 KEY `FK_sales_order_entity_text_entity_type` (`entity_type_id`),
00330 KEY `FK_sales_order_entity_text_attribute` (`attribute_id`),
00331 KEY `FK_sales_order_entity_text_store` (`store_id`),
00332 KEY `FK_sales_order_entity_text` (`entity_id`),
00333 CONSTRAINT `FK_sales_order_entity_text` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_order_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00334 CONSTRAINT `FK_sales_order_entity_text_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00335 CONSTRAINT `FK_sales_order_entity_text_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00336 CONSTRAINT `FK_sales_order_entity_text_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00337 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00338
00339 /*Data for the table `sales_order_entity_text` */
00340
00341 /*Table structure for table `sales_order_entity_varchar` */
00342
00343 -- DROP TABLE IF EXISTS {$this->getTable('sales_order_entity_varchar')};
00344 CREATE TABLE {$this->getTable('sales_order_entity_varchar')} (
00345 `value_id` int(11) NOT NULL auto_increment,
00346 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00347 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00348 `store_id` smallint(5) unsigned NOT NULL default '0',
00349 `entity_id` int(10) unsigned NOT NULL default '0',
00350 `value` varchar(255) NOT NULL default '',
00351 PRIMARY KEY (`value_id`),
00352 KEY `FK_sales_order_entity_varchar_entity_type` (`entity_type_id`),
00353 KEY `FK_sales_order_entity_varchar_attribute` (`attribute_id`),
00354 KEY `FK_sales_order_entity_varchar_store` (`store_id`),
00355 KEY `FK_sales_order_entity_varchar` (`entity_id`),
00356 CONSTRAINT `FK_sales_order_entity_varchar` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_order_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00357 CONSTRAINT `FK_sales_order_entity_varchar_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00358 CONSTRAINT `FK_sales_order_entity_varchar_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00359 CONSTRAINT `FK_sales_order_entity_varchar_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00360 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00361
00362 /*Data for the table `sales_order_entity_varchar` */
00363
00364 /*Table structure for table `sales_quote_entity` */
00365
00366 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity')};
00367 CREATE TABLE {$this->getTable('sales_quote_entity')} (
00368 `entity_id` int(10) unsigned NOT NULL auto_increment,
00369 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00370 `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
00371 `increment_id` varchar(50) NOT NULL default '',
00372 `parent_id` int(10) unsigned NOT NULL default '0',
00373 `store_id` smallint(5) unsigned NOT NULL default '0',
00374 `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
00375 `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
00376 `is_active` tinyint(1) unsigned NOT NULL default '1',
00377 PRIMARY KEY (`entity_id`),
00378 KEY `FK_sales_quote_entity_type` (`entity_type_id`),
00379 KEY `FK_sales_quote_entity_store` (`store_id`),
00380 CONSTRAINT `FK_sales_quote_entity_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00381 CONSTRAINT `FK_sales_quote_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00382 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
00383
00384 /*Table structure for table `sales_quote_entity_datetime` */
00385
00386 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_datetime')};
00387 CREATE TABLE {$this->getTable('sales_quote_entity_datetime')} (
00388 `value_id` int(11) NOT NULL auto_increment,
00389 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00390 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00391 `store_id` smallint(5) unsigned NOT NULL default '0',
00392 `entity_id` int(10) unsigned NOT NULL default '0',
00393 `value` datetime NOT NULL default '0000-00-00 00:00:00',
00394 PRIMARY KEY (`value_id`),
00395 KEY `FK_sales_quote_entity_datetime_entity_type` (`entity_type_id`),
00396 KEY `FK_sales_quote_entity_datetime_attribute` (`attribute_id`),
00397 KEY `FK_sales_quote_entity_datetime_store` (`store_id`),
00398 KEY `FK_sales_quote_entity_datetime` (`entity_id`),
00399 CONSTRAINT `FK_sales_quote_entity_datetime` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00400 CONSTRAINT `FK_sales_quote_entity_datetime_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00401 CONSTRAINT `FK_sales_quote_entity_datetime_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00402 CONSTRAINT `FK_sales_quote_entity_datetime_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00403 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00404
00405 /*Data for the table `sales_quote_entity_datetime` */
00406
00407 /*Table structure for table `sales_quote_entity_decimal` */
00408
00409 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_decimal')};
00410 CREATE TABLE {$this->getTable('sales_quote_entity_decimal')} (
00411 `value_id` int(11) NOT NULL auto_increment,
00412 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00413 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00414 `store_id` smallint(5) unsigned NOT NULL default '0',
00415 `entity_id` int(10) unsigned NOT NULL default '0',
00416 `value` decimal(12,4) NOT NULL default '0.0000',
00417 PRIMARY KEY (`value_id`),
00418 KEY `FK_sales_quote_entity_decimal_entity_type` (`entity_type_id`),
00419 KEY `FK_sales_quote_entity_decimal_attribute` (`attribute_id`),
00420 KEY `FK_sales_quote_entity_decimal_store` (`store_id`),
00421 KEY `FK_sales_quote_entity_decimal` (`entity_id`),
00422 CONSTRAINT `FK_sales_quote_entity_decimal` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00423 CONSTRAINT `FK_sales_quote_entity_decimal_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00424 CONSTRAINT `FK_sales_quote_entity_decimal_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00425 CONSTRAINT `FK_sales_quote_entity_decimal_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00426 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00427
00428
00429 /*Table structure for table `sales_quote_entity_int` */
00430
00431 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_int')};
00432 CREATE TABLE {$this->getTable('sales_quote_entity_int')} (
00433 `value_id` int(11) NOT NULL auto_increment,
00434 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00435 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00436 `store_id` smallint(5) unsigned NOT NULL default '0',
00437 `entity_id` int(10) unsigned NOT NULL default '0',
00438 `value` int(11) NOT NULL default '0',
00439 PRIMARY KEY (`value_id`),
00440 KEY `FK_sales_quote_entity_int_entity_type` (`entity_type_id`),
00441 KEY `FK_sales_quote_entity_int_attribute` (`attribute_id`),
00442 KEY `FK_sales_quote_entity_int_store` (`store_id`),
00443 KEY `FK_sales_quote_entity_int` (`entity_id`),
00444 CONSTRAINT `FK_sales_quote_entity_int` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00445 CONSTRAINT `FK_sales_quote_entity_int_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00446 CONSTRAINT `FK_sales_quote_entity_int_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00447 CONSTRAINT `FK_sales_quote_entity_int_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00448 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00449
00450
00451 /*Table structure for table `sales_quote_entity_text` */
00452
00453 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_text')};
00454 CREATE TABLE {$this->getTable('sales_quote_entity_text')} (
00455 `value_id` int(11) NOT NULL auto_increment,
00456 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00457 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00458 `store_id` smallint(5) unsigned NOT NULL default '0',
00459 `entity_id` int(10) unsigned NOT NULL default '0',
00460 `value` text NOT NULL,
00461 PRIMARY KEY (`value_id`),
00462 KEY `FK_sales_quote_entity_text_entity_type` (`entity_type_id`),
00463 KEY `FK_sales_quote_entity_text_attribute` (`attribute_id`),
00464 KEY `FK_sales_quote_entity_text_store` (`store_id`),
00465 KEY `FK_sales_quote_entity_text` (`entity_id`),
00466 CONSTRAINT `FK_sales_quote_entity_text` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00467 CONSTRAINT `FK_sales_quote_entity_text_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00468 CONSTRAINT `FK_sales_quote_entity_text_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00469 CONSTRAINT `FK_sales_quote_entity_text_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00470 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00471
00472 /*Data for the table `sales_quote_entity_text` */
00473
00474 /*Table structure for table `sales_quote_entity_varchar` */
00475
00476 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_entity_varchar')};
00477 CREATE TABLE {$this->getTable('sales_quote_entity_varchar')} (
00478 `value_id` int(11) NOT NULL auto_increment,
00479 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00480 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00481 `store_id` smallint(5) unsigned NOT NULL default '0',
00482 `entity_id` int(10) unsigned NOT NULL default '0',
00483 `value` varchar(255) NOT NULL default '',
00484 PRIMARY KEY (`value_id`),
00485 KEY `FK_sales_quote_entity_varchar_entity_type` (`entity_type_id`),
00486 KEY `FK_sales_quote_entity_varchar_attribute` (`attribute_id`),
00487 KEY `FK_sales_quote_entity_varchar_store` (`store_id`),
00488 KEY `FK_sales_quote_entity_varchar` (`entity_id`),
00489 CONSTRAINT `FK_sales_quote_entity_varchar` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_entity')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00490 CONSTRAINT `FK_sales_quote_entity_varchar_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00491 CONSTRAINT `FK_sales_quote_entity_varchar_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00492 CONSTRAINT `FK_sales_quote_entity_varchar_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00493 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00494
00495 /*Table structure for table `sales_quote_rule` */
00496
00497 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_rule')};
00498 CREATE TABLE {$this->getTable('sales_quote_rule')} (
00499 `quote_rule_id` int(10) unsigned NOT NULL auto_increment,
00500 `name` varchar(255) NOT NULL default '',
00501 `description` text NOT NULL,
00502 `is_active` tinyint(4) NOT NULL default '0',
00503 `start_at` datetime NOT NULL default '0000-00-00 00:00:00',
00504 `expire_at` datetime NOT NULL default '0000-00-00 00:00:00',
00505 `coupon_code` varchar(50) NOT NULL default '',
00506 `customer_registered` tinyint(1) NOT NULL default '2',
00507 `customer_new_buyer` tinyint(1) NOT NULL default '2',
00508 `show_in_catalog` tinyint(1) NOT NULL default '0',
00509 `sort_order` smallint(6) NOT NULL default '0',
00510 `conditions_serialized` text NOT NULL,
00511 `actions_serialized` text NOT NULL,
00512 PRIMARY KEY (`quote_rule_id`),
00513 KEY `rule_name` (`name`),
00514 KEY `is_active` (`is_active`,`start_at`,`expire_at`,`coupon_code`,`customer_registered`,`customer_new_buyer`,`show_in_catalog`,`sort_order`)
00515 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00516
00517 /*Data for the table `sales_quote_rule` */
00518
00519 /*Table structure for table `sales_quote_temp` */
00520
00521 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_temp')};
00522 CREATE TABLE {$this->getTable('sales_quote_temp')} (
00523 `entity_id` int(10) unsigned NOT NULL auto_increment,
00524 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00525 `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
00526 `increment_id` varchar(50) NOT NULL default '',
00527 `parent_id` int(10) unsigned NOT NULL default '0',
00528 `store_id` smallint(5) unsigned NOT NULL default '0',
00529 `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
00530 `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
00531 `is_active` tinyint(1) unsigned NOT NULL default '1',
00532 PRIMARY KEY (`entity_id`),
00533 KEY `FK_sales_quote_temp_type` (`entity_type_id`),
00534 KEY `FK_sales_quote_temp_store` (`store_id`),
00535 CONSTRAINT `FK_sales_quote_temp_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00536 CONSTRAINT `FK_sales_quote_temp_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE
00537 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
00538
00539 /*Data for the table `sales_quote_temp` */
00540
00541 /*Table structure for table `sales_quote_temp_datetime` */
00542
00543 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_temp_datetime')};
00544 CREATE TABLE {$this->getTable('sales_quote_temp_datetime')} (
00545 `value_id` int(11) NOT NULL auto_increment,
00546 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00547 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00548 `store_id` smallint(5) unsigned NOT NULL default '0',
00549 `entity_id` int(10) unsigned NOT NULL default '0',
00550 `value` datetime NOT NULL default '0000-00-00 00:00:00',
00551 PRIMARY KEY (`value_id`),
00552 KEY `FK_sales_quote_temp_datetime_entity_type` (`entity_type_id`),
00553 KEY `FK_sales_quote_temp_datetime_attribute` (`attribute_id`),
00554 KEY `FK_sales_quote_temp_datetime_store` (`store_id`),
00555 KEY `FK_sales_quote_temp_datetime` (`entity_id`),
00556 CONSTRAINT `FK_sales_quote_temp_datetime` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_temp')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00557 CONSTRAINT `FK_sales_quote_temp_datetime_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00558 CONSTRAINT `FK_sales_quote_temp_datetime_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00559 CONSTRAINT `FK_sales_quote_temp_datetime_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00560 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00561
00562 /*Data for the table `sales_quote_temp_datetime` */
00563
00564 /*Table structure for table `sales_quote_temp_decimal` */
00565
00566 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_temp_decimal')};
00567 CREATE TABLE {$this->getTable('sales_quote_temp_decimal')} (
00568 `value_id` int(11) NOT NULL auto_increment,
00569 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00570 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00571 `store_id` smallint(5) unsigned NOT NULL default '0',
00572 `entity_id` int(10) unsigned NOT NULL default '0',
00573 `value` decimal(12,4) NOT NULL default '0.0000',
00574 PRIMARY KEY (`value_id`),
00575 KEY `FK_sales_quote_temp_decimal_entity_type` (`entity_type_id`),
00576 KEY `FK_sales_quote_temp_decimal_attribute` (`attribute_id`),
00577 KEY `FK_sales_quote_temp_decimal_store` (`store_id`),
00578 KEY `FK_sales_quote_temp_decimal` (`entity_id`),
00579 CONSTRAINT `FK_sales_quote_temp_decimal` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_temp')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00580 CONSTRAINT `FK_sales_quote_temp_decimal_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00581 CONSTRAINT `FK_sales_quote_temp_decimal_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00582 CONSTRAINT `FK_sales_quote_temp_decimal_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00583 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00584
00585 /*Data for the table `sales_quote_temp_decimal` */
00586
00587 /*Table structure for table `sales_quote_temp_int` */
00588
00589 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_temp_int')};
00590 CREATE TABLE {$this->getTable('sales_quote_temp_int')} (
00591 `value_id` int(11) NOT NULL auto_increment,
00592 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00593 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00594 `store_id` smallint(5) unsigned NOT NULL default '0',
00595 `entity_id` int(10) unsigned NOT NULL default '0',
00596 `value` int(11) NOT NULL default '0',
00597 PRIMARY KEY (`value_id`),
00598 KEY `FK_sales_quote_temp_int_entity_type` (`entity_type_id`),
00599 KEY `FK_sales_quote_temp_int_attribute` (`attribute_id`),
00600 KEY `FK_sales_quote_temp_int_store` (`store_id`),
00601 KEY `FK_sales_quote_temp_int` (`entity_id`),
00602 CONSTRAINT `FK_sales_quote_temp_int` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_temp')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00603 CONSTRAINT `FK_sales_quote_temp_int_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00604 CONSTRAINT `FK_sales_quote_temp_int_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00605 CONSTRAINT `FK_sales_quote_temp_int_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00606 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00607
00608 /*Data for the table `sales_quote_temp_int` */
00609
00610 /*Table structure for table `sales_quote_temp_text` */
00611
00612 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_temp_text')};
00613 CREATE TABLE {$this->getTable('sales_quote_temp_text')} (
00614 `value_id` int(11) NOT NULL auto_increment,
00615 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00616 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00617 `store_id` smallint(5) unsigned NOT NULL default '0',
00618 `entity_id` int(10) unsigned NOT NULL default '0',
00619 `value` text NOT NULL,
00620 PRIMARY KEY (`value_id`),
00621 KEY `FK_sales_quote_temp_text_entity_type` (`entity_type_id`),
00622 KEY `FK_sales_quote_temp_text_attribute` (`attribute_id`),
00623 KEY `FK_sales_quote_temp_text_store` (`store_id`),
00624 KEY `FK_sales_quote_temp_text` (`entity_id`),
00625 CONSTRAINT `FK_sales_quote_temp_text` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_temp')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00626 CONSTRAINT `FK_sales_quote_temp_text_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00627 CONSTRAINT `FK_sales_quote_temp_text_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00628 CONSTRAINT `FK_sales_quote_temp_text_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00629 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00630
00631 /*Data for the table `sales_quote_temp_text` */
00632
00633 /*Table structure for table `sales_quote_temp_varchar` */
00634
00635 -- DROP TABLE IF EXISTS {$this->getTable('sales_quote_temp_varchar')};
00636 CREATE TABLE {$this->getTable('sales_quote_temp_varchar')} (
00637 `value_id` int(11) NOT NULL auto_increment,
00638 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00639 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00640 `store_id` smallint(5) unsigned NOT NULL default '0',
00641 `entity_id` int(10) unsigned NOT NULL default '0',
00642 `value` varchar(255) NOT NULL default '',
00643 PRIMARY KEY (`value_id`),
00644 KEY `FK_sales_quote_temp_varchar_entity_type` (`entity_type_id`),
00645 KEY `FK_sales_quote_temp_varchar_attribute` (`attribute_id`),
00646 KEY `FK_sales_quote_temp_varchar_store` (`store_id`),
00647 KEY `FK_sales_quote_temp_varchar` (`entity_id`),
00648 CONSTRAINT `FK_sales_quote_temp_varchar` FOREIGN KEY (`entity_id`) REFERENCES {$this->getTable('sales_quote_temp')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00649 CONSTRAINT `FK_sales_quote_temp_varchar_attribute` FOREIGN KEY (`attribute_id`) REFERENCES {$this->getTable('eav_attribute')} (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00650 CONSTRAINT `FK_sales_quote_temp_varchar_entity_type` FOREIGN KEY (`entity_type_id`) REFERENCES {$this->getTable('eav_entity_type')} (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00651 CONSTRAINT `FK_sales_quote_temp_varchar_store` FOREIGN KEY (`store_id`) REFERENCES {$this->getTable('core_store')} (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00652 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00653
00654 /*Data for the table `sales_quote_temp_varchar` */
00655
00656 ;
00657 ;
00658 ");
00659
00660 $installer->installEntities();
00661
00662 $installer->endSetup();