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('customer_entity')}`;
00035 CREATE TABLE `{$this->getTable('customer_entity')}` (
00036 `entity_id` int(10) unsigned NOT NULL auto_increment,
00037 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00038 `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
00039 `increment_id` varchar(50) NOT NULL default '',
00040 `parent_id` int(10) unsigned default NULL,
00041 `store_id` smallint(5) unsigned NOT NULL default '0',
00042 `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
00043 `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
00044 `is_active` tinyint(1) unsigned NOT NULL default '1',
00045 PRIMARY KEY (`entity_id`),
00046 KEY `FK_CUSTOMER_ENTITY_ENTITY_TYPE` (`entity_type_id`),
00047 KEY `FK_CUSTOMER_ENTITY_STORE` (`store_id`),
00048 KEY `FK_CUSTOMER_ENTITY_PARENT_ENTITY` (`parent_id`)
00049 -- ,CONSTRAINT `FK_CUSTOMER_ENTITY_PARENT_ENTITY` FOREIGN KEY (`parent_id`) REFERENCES `{$this->getTable('customer_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
00050 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Customer Entityies';
00051
00052 -- DROP TABLE IF EXISTS `{$this->getTable('customer_entity_datetime')}`;
00053 CREATE TABLE `{$this->getTable('customer_entity_datetime')}` (
00054 `value_id` int(11) NOT NULL auto_increment,
00055 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00056 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00057 `store_id` smallint(5) unsigned NOT NULL default '0',
00058 `entity_id` int(10) unsigned NOT NULL default '0',
00059 `value` datetime NOT NULL default '0000-00-00 00:00:00',
00060 PRIMARY KEY (`value_id`),
00061 KEY `FK_CUSTOMER_DATETIME_ENTITY_TYPE` (`entity_type_id`),
00062 KEY `FK_CUSTOMER_DATETIME_ATTRIBUTE` (`attribute_id`),
00063 KEY `FK_CUSTOMER_DATETIME_STORE` (`store_id`),
00064 KEY `FK_CUSTOMER_DATETIME_ENTITY` (`entity_id`),
00065 CONSTRAINT `FK_CUSTOMER_DATETIME_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00066 CONSTRAINT `FK_CUSTOMER_DATETIME_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00067 CONSTRAINT `FK_CUSTOMER_DATETIME_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00068 CONSTRAINT `FK_CUSTOMER_DATETIME_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00069 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00070
00071 -- DROP TABLE IF EXISTS `{$this->getTable('customer_entity_decimal')}`;
00072 CREATE TABLE `{$this->getTable('customer_entity_decimal')}` (
00073 `value_id` int(11) NOT NULL auto_increment,
00074 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00075 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00076 `store_id` smallint(5) unsigned NOT NULL default '0',
00077 `entity_id` int(10) unsigned NOT NULL default '0',
00078 `value` decimal(12,4) NOT NULL default '0.0000',
00079 PRIMARY KEY (`value_id`),
00080 KEY `FK_CUSTOMER_DECIMAL_ENTITY_TYPE` (`entity_type_id`),
00081 KEY `FK_CUSTOMER_DECIMAL_ATTRIBUTE` (`attribute_id`),
00082 KEY `FK_CUSTOMER_DECIMAL_STORE` (`store_id`),
00083 KEY `FK_CUSTOMER_DECIMAL_ENTITY` (`entity_id`),
00084 CONSTRAINT `FK_CUSTOMER_DECIMAL_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00085 CONSTRAINT `FK_CUSTOMER_DECIMAL_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00086 CONSTRAINT `FK_CUSTOMER_DECIMAL_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00087 CONSTRAINT `FK_CUSTOMER_DECIMAL_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00088 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00089
00090 -- DROP TABLE IF EXISTS `{$this->getTable('customer_entity_int')}`;
00091 CREATE TABLE `{$this->getTable('customer_entity_int')}` (
00092 `value_id` int(11) NOT NULL auto_increment,
00093 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00094 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00095 `store_id` smallint(5) unsigned NOT NULL default '0',
00096 `entity_id` int(10) unsigned NOT NULL default '0',
00097 `value` int(11) NOT NULL default '0',
00098 PRIMARY KEY (`value_id`),
00099 KEY `FK_CUSTOMER_INT_ENTITY_TYPE` (`entity_type_id`),
00100 KEY `FK_CUSTOMER_INT_ATTRIBUTE` (`attribute_id`),
00101 KEY `FK_CUSTOMER_INT_STORE` (`store_id`),
00102 KEY `FK_CUSTOMER_INT_ENTITY` (`entity_id`),
00103 CONSTRAINT `FK_CUSTOMER_INT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00104 CONSTRAINT `FK_CUSTOMER_INT_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00105 CONSTRAINT `FK_CUSTOMER_INT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00106 CONSTRAINT `FK_CUSTOMER_INT_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00107 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00108
00109 -- DROP TABLE IF EXISTS `{$this->getTable('customer_entity_text')}`;
00110 CREATE TABLE `{$this->getTable('customer_entity_text')}` (
00111 `value_id` int(11) NOT NULL auto_increment,
00112 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00113 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00114 `store_id` smallint(5) unsigned NOT NULL default '0',
00115 `entity_id` int(10) unsigned NOT NULL default '0',
00116 `value` text NOT NULL,
00117 PRIMARY KEY (`value_id`),
00118 KEY `FK_CUSTOMER_TEXT_ENTITY_TYPE` (`entity_type_id`),
00119 KEY `FK_CUSTOMER_TEXT_ATTRIBUTE` (`attribute_id`),
00120 KEY `FK_CUSTOMER_TEXT_STORE` (`store_id`),
00121 KEY `FK_CUSTOMER_TEXT_ENTITY` (`entity_id`),
00122 CONSTRAINT `FK_CUSTOMER_TEXT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00123 CONSTRAINT `FK_CUSTOMER_TEXT_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00124 CONSTRAINT `FK_CUSTOMER_TEXT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00125 CONSTRAINT `FK_CUSTOMER_TEXT_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00126 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00127
00128 -- DROP TABLE IF EXISTS `{$this->getTable('customer_entity_varchar')}`;
00129 CREATE TABLE `{$this->getTable('customer_entity_varchar')}` (
00130 `value_id` int(11) NOT NULL auto_increment,
00131 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00132 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00133 `store_id` smallint(5) unsigned NOT NULL default '0',
00134 `entity_id` int(10) unsigned NOT NULL default '0',
00135 `value` varchar(255) NOT NULL default '',
00136 PRIMARY KEY (`value_id`),
00137 KEY `FK_CUSTOMER_VARCHAR_ENTITY_TYPE` (`entity_type_id`),
00138 KEY `FK_CUSTOMER_VARCHAR_ATTRIBUTE` (`attribute_id`),
00139 KEY `FK_CUSTOMER_VARCHAR_STORE` (`store_id`),
00140 KEY `FK_CUSTOMER_VARCHAR_ENTITY` (`entity_id`),
00141 CONSTRAINT `FK_CUSTOMER_VARCHAR_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00142 CONSTRAINT `FK_CUSTOMER_VARCHAR_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00143 CONSTRAINT `FK_CUSTOMER_VARCHAR_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00144 CONSTRAINT `FK_CUSTOMER_VARCHAR_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00145 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00146
00147 -- DROP TABLE IF EXISTS `{$this->getTable('customer_group')}`;
00148 CREATE TABLE `{$this->getTable('customer_group')}` (
00149 `customer_group_id` smallint(3) unsigned NOT NULL auto_increment,
00150 `customer_group_code` varchar(32) NOT NULL default '',
00151 `tax_class_id` int(10) unsigned NOT NULL default '0',
00152 PRIMARY KEY (`customer_group_id`)
00153 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Customer groups';
00154
00155 insert into `{$this->getTable('customer_group')}` (`customer_group_id`,`customer_group_code`,`tax_class_id`) values (0,'NOT LOGGED IN',1),(1,'General',3),(2,'Wholesale',3),(3,'Retailer',3);
00156
00157 -- DROP TABLE IF EXISTS `{$this->getTable('customer_address_entity')}`;
00158 CREATE TABLE `{$this->getTable('customer_address_entity')}` (
00159 `entity_id` int(10) unsigned NOT NULL auto_increment,
00160 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00161 `attribute_set_id` smallint(5) unsigned NOT NULL default '0',
00162 `increment_id` varchar(50) NOT NULL default '',
00163 `parent_id` int(10) unsigned default NULL,
00164 `store_id` smallint(5) unsigned NOT NULL default '0',
00165 `created_at` datetime NOT NULL default '0000-00-00 00:00:00',
00166 `updated_at` datetime NOT NULL default '0000-00-00 00:00:00',
00167 `is_active` tinyint(1) unsigned NOT NULL default '1',
00168 PRIMARY KEY (`entity_id`),
00169 KEY `FK_CUSTOMER_ADDRESS_CUSTOMER_ID` (`parent_id`),
00170 CONSTRAINT `FK_CUSTOMER_ADDRESS_CUSTOMER_ID` FOREIGN KEY (`parent_id`) REFERENCES `{$this->getTable('customer_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
00171 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Customer Address Entities';
00172
00173 -- DROP TABLE IF EXISTS `{$this->getTable('customer_address_entity_datetime')}`;
00174 CREATE TABLE `{$this->getTable('customer_address_entity_datetime')}` (
00175 `value_id` int(11) NOT NULL auto_increment,
00176 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00177 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00178 `store_id` smallint(5) unsigned NOT NULL default '0',
00179 `entity_id` int(10) unsigned NOT NULL default '0',
00180 `value` datetime NOT NULL default '0000-00-00 00:00:00',
00181 PRIMARY KEY (`value_id`),
00182 KEY `FK_CUSTOMER_ADDRESS_DATETIME_ENTITY_TYPE` (`entity_type_id`),
00183 KEY `FK_CUSTOMER_ADDRESS_DATETIME_ATTRIBUTE` (`attribute_id`),
00184 KEY `FK_CUSTOMER_ADDRESS_DATETIME_STORE` (`store_id`),
00185 KEY `FK_CUSTOMER_ADDRESS_DATETIME_ENTITY` (`entity_id`),
00186 CONSTRAINT `FK_CUSTOMER_ADDRESS_DATETIME_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00187 CONSTRAINT `FK_CUSTOMER_ADDRESS_DATETIME_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_address_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00188 CONSTRAINT `FK_CUSTOMER_ADDRESS_DATETIME_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00189 CONSTRAINT `FK_CUSTOMER_ADDRESS_DATETIME_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00190 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00191
00192 -- DROP TABLE IF EXISTS `{$this->getTable('customer_address_entity_decimal')}`;
00193 CREATE TABLE `{$this->getTable('customer_address_entity_decimal')}` (
00194 `value_id` int(11) NOT NULL auto_increment,
00195 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00196 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00197 `store_id` smallint(5) unsigned NOT NULL default '0',
00198 `entity_id` int(10) unsigned NOT NULL default '0',
00199 `value` decimal(12,4) NOT NULL default '0.0000',
00200 PRIMARY KEY (`value_id`),
00201 KEY `FK_CUSTOMER_ADDRESS_DECIMAL_ENTITY_TYPE` (`entity_type_id`),
00202 KEY `FK_CUSTOMER_ADDRESS_DECIMAL_ATTRIBUTE` (`attribute_id`),
00203 KEY `FK_CUSTOMER_ADDRESS_DECIMAL_STORE` (`store_id`),
00204 KEY `FK_CUSTOMER_ADDRESS_DECIMAL_ENTITY` (`entity_id`),
00205 CONSTRAINT `FK_CUSTOMER_ADDRESS_DECIMAL_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00206 CONSTRAINT `FK_CUSTOMER_ADDRESS_DECIMAL_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_address_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00207 CONSTRAINT `FK_CUSTOMER_ADDRESS_DECIMAL_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00208 CONSTRAINT `FK_CUSTOMER_ADDRESS_DECIMAL_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00209 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00210
00211 -- DROP TABLE IF EXISTS `{$this->getTable('customer_address_entity_int')}`;
00212 CREATE TABLE `{$this->getTable('customer_address_entity_int')}` (
00213 `value_id` int(11) NOT NULL auto_increment,
00214 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00215 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00216 `store_id` smallint(5) unsigned NOT NULL default '0',
00217 `entity_id` int(10) unsigned NOT NULL default '0',
00218 `value` int(11) NOT NULL default '0',
00219 PRIMARY KEY (`value_id`),
00220 KEY `FK_CUSTOMER_ADDRESS_INT_ENTITY_TYPE` (`entity_type_id`),
00221 KEY `FK_CUSTOMER_ADDRESS_INT_ATTRIBUTE` (`attribute_id`),
00222 KEY `FK_CUSTOMER_ADDRESS_INT_STORE` (`store_id`),
00223 KEY `FK_CUSTOMER_ADDRESS_INT_ENTITY` (`entity_id`),
00224 CONSTRAINT `FK_CUSTOMER_ADDRESS_INT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00225 CONSTRAINT `FK_CUSTOMER_ADDRESS_INT_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_address_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00226 CONSTRAINT `FK_CUSTOMER_ADDRESS_INT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00227 CONSTRAINT `FK_CUSTOMER_ADDRESS_INT_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00228 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00229
00230 -- DROP TABLE IF EXISTS `{$this->getTable('customer_address_entity_text')}`;
00231 CREATE TABLE `{$this->getTable('customer_address_entity_text')}` (
00232 `value_id` int(11) NOT NULL auto_increment,
00233 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00234 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00235 `store_id` smallint(5) unsigned NOT NULL default '0',
00236 `entity_id` int(10) unsigned NOT NULL default '0',
00237 `value` text NOT NULL,
00238 PRIMARY KEY (`value_id`),
00239 KEY `FK_CUSTOMER_ADDRESS_TEXT_ENTITY_TYPE` (`entity_type_id`),
00240 KEY `FK_CUSTOMER_ADDRESS_TEXT_ATTRIBUTE` (`attribute_id`),
00241 KEY `FK_CUSTOMER_ADDRESS_TEXT_STORE` (`store_id`),
00242 KEY `FK_CUSTOMER_ADDRESS_TEXT_ENTITY` (`entity_id`),
00243 CONSTRAINT `FK_CUSTOMER_ADDRESS_TEXT_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00244 CONSTRAINT `FK_CUSTOMER_ADDRESS_TEXT_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_address_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00245 CONSTRAINT `FK_CUSTOMER_ADDRESS_TEXT_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00246 CONSTRAINT `FK_CUSTOMER_ADDRESS_TEXT_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00247 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00248
00249 -- DROP TABLE IF EXISTS `{$this->getTable('customer_address_entity_varchar')}`;
00250 CREATE TABLE `{$this->getTable('customer_address_entity_varchar')}` (
00251 `value_id` int(11) NOT NULL auto_increment,
00252 `entity_type_id` smallint(8) unsigned NOT NULL default '0',
00253 `attribute_id` smallint(5) unsigned NOT NULL default '0',
00254 `store_id` smallint(5) unsigned NOT NULL default '0',
00255 `entity_id` int(10) unsigned NOT NULL default '0',
00256 `value` varchar(255) NOT NULL default '',
00257 PRIMARY KEY (`value_id`),
00258 KEY `FK_CUSTOMER_ADDRESS_VARCHAR_ENTITY_TYPE` (`entity_type_id`),
00259 KEY `FK_CUSTOMER_ADDRESS_VARCHAR_ATTRIBUTE` (`attribute_id`),
00260 KEY `FK_CUSTOMER_ADDRESS_VARCHAR_STORE` (`store_id`),
00261 KEY `FK_CUSTOMER_ADDRESS_VARCHAR_ENTITY` (`entity_id`),
00262 CONSTRAINT `FK_CUSTOMER_ADDRESS_VARCHAR_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `{$this->getTable('eav_attribute')}` (`attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00263 CONSTRAINT `FK_CUSTOMER_ADDRESS_VARCHAR_ENTITY` FOREIGN KEY (`entity_id`) REFERENCES `{$this->getTable('customer_address_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00264 CONSTRAINT `FK_CUSTOMER_ADDRESS_VARCHAR_ENTITY_TYPE` FOREIGN KEY (`entity_type_id`) REFERENCES `{$this->getTable('eav_entity_type')}` (`entity_type_id`) ON DELETE CASCADE ON UPDATE CASCADE,
00265 CONSTRAINT `FK_CUSTOMER_ADDRESS_VARCHAR_STORE` FOREIGN KEY (`store_id`) REFERENCES `{$this->getTable('core_store')}` (`store_id`) ON DELETE CASCADE ON UPDATE CASCADE
00266 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
00267
00268 ");
00269
00270 $installer->endSetup();
00271
00272 $installer->installEntities();
00273