· 9 years ago · Jan 25, 2017, 06:10 PM
1stanislavs-MacBook-Pro:shell stanislav.shylo$ php -f dbUpdate.php
2
3Warning: include_once(autoload.php): failed to open stream: No such file or directory in /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/Mage.php on line 53
4
5Warning: include_once(): Failed opening 'autoload.php' for inclusion (include_path='/Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/local:/Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/community:/Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/core:/Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib:/Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/vendor:.::/Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie') in /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/Mage.php on line 53
6Applying updates...
7<pre>PDOException Object
8(
9 [message:protected] => SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
10 [string:Exception:private] =>
11 [code:protected] => 42000
12 [file:protected] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Zend/Db/Statement/Pdo.php
13 [line:protected] => 228
14 [trace:Exception:private] => Array
15 (
16 [0] => Array
17 (
18 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Zend/Db/Statement/Pdo.php
19 [line] => 228
20 [function] => execute
21 [class] => PDOStatement
22 [type] => ->
23 [args] => Array
24 (
25 [0] => Array
26 (
27 )
28
29 )
30
31 )
32
33 [1] => Array
34 (
35 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Varien/Db/Statement/Pdo/Mysql.php
36 [line] => 110
37 [function] => _execute
38 [class] => Zend_Db_Statement_Pdo
39 [type] => ->
40 [args] => Array
41 (
42 [0] => Array
43 (
44 )
45
46 )
47
48 )
49
50 [2] => Array
51 (
52 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Zend/Db/Statement.php
53 [line] => 300
54 [function] => _execute
55 [class] => Varien_Db_Statement_Pdo_Mysql
56 [type] => ->
57 [args] => Array
58 (
59 [0] => Array
60 (
61 )
62
63 )
64
65 )
66
67 [3] => Array
68 (
69 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Zend/Db/Adapter/Abstract.php
70 [line] => 479
71 [function] => execute
72 [class] => Zend_Db_Statement
73 [type] => ->
74 [args] => Array
75 (
76 [0] => Array
77 (
78 )
79
80 )
81
82 )
83
84 [4] => Array
85 (
86 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Zend/Db/Adapter/Pdo/Abstract.php
87 [line] => 238
88 [function] => query
89 [class] => Zend_Db_Adapter_Abstract
90 [type] => ->
91 [args] => Array
92 (
93 [0] => CREATE TABLE `b2b_xml_account_types` (
94 `b2b_xml_account_type_code` VARCHAR(255) NULL,
95 `b2b_xml_account_type_logo` VARCHAR(255) NULL,
96 PRIMARY KEY (`b2b_xml_account_type_code`))
97 ENGINE = InnoDB
98 [1] => Array
99 (
100 )
101
102 )
103
104 )
105
106 [5] => Array
107 (
108 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Varien/Db/Adapter/Pdo/Mysql.php
109 [line] => 419
110 [function] => query
111 [class] => Zend_Db_Adapter_Pdo_Abstract
112 [type] => ->
113 [args] => Array
114 (
115 [0] => CREATE TABLE `b2b_xml_account_types` (
116 `b2b_xml_account_type_code` VARCHAR(255) NULL,
117 `b2b_xml_account_type_logo` VARCHAR(255) NULL,
118 PRIMARY KEY (`b2b_xml_account_type_code`))
119 ENGINE = InnoDB
120 [1] => Array
121 (
122 )
123
124 )
125
126 )
127
128 [6] => Array
129 (
130 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Varien/Db/Adapter/Pdo/Mysql.php
131 [line] => 340
132 [function] => query
133 [class] => Varien_Db_Adapter_Pdo_Mysql
134 [type] => ->
135 [args] => Array
136 (
137 [0] => CREATE TABLE `b2b_xml_account_types` (
138 `b2b_xml_account_type_code` VARCHAR(255) NULL,
139 `b2b_xml_account_type_logo` VARCHAR(255) NULL,
140 PRIMARY KEY (`b2b_xml_account_type_code`))
141 ENGINE = InnoDB
142 )
143
144 )
145
146 [7] => Array
147 (
148 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Varien/Db/Adapter/Pdo/Mysql.php
149 [line] => 608
150 [function] => raw_query
151 [class] => Varien_Db_Adapter_Pdo_Mysql
152 [type] => ->
153 [args] => Array
154 (
155 [0] => CREATE TABLE `b2b_xml_account_types` (
156 `b2b_xml_account_type_code` VARCHAR(255) NULL,
157 `b2b_xml_account_type_logo` VARCHAR(255) NULL,
158 PRIMARY KEY (`b2b_xml_account_type_code`))
159 ENGINE = InnoDB
160 )
161
162 )
163
164 [8] => Array
165 (
166 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/lib/Varien/Db/Adapter/Pdo/Mysql.php
167 [line] => 590
168 [function] => multi_query
169 [class] => Varien_Db_Adapter_Pdo_Mysql
170 [type] => ->
171 [args] => Array
172 (
173 [0] =>
174 SET FOREIGN_KEY_CHECKS=0;
175
176 DROP TABLE IF EXISTS `b2b_xml_modes_lang`;
177 CREATE TABLE `b2b_xml_modes_lang` (
178 `b2b_xml_mode_code` VARCHAR(255) NOT NULL,
179 `lang_iso` VARCHAR(2) NULL,
180 `mode_lang_name` VARCHAR(255) NULL,
181 INDEX `idx_b2b_xml_modes_lang` (`b2b_xml_mode_code` ASC))
182 ENGINE = InnoDB;
183
184 DROP TABLE IF EXISTS `b2b_xml_operation_lang`;
185 CREATE TABLE `b2b_xml_operation_lang` (
186 `b2b_xml_operation_code` VARCHAR(255) NOT NULL,
187 `lang_iso` VARCHAR(2) NULL,
188 `operation_lang_name` VARCHAR(255) NULL,
189 INDEX `idx_b2b_xml_operation_lang` (`b2b_xml_operation_code` ASC))
190 ENGINE = InnoDB;
191
192 DROP TABLE IF EXISTS `b2b_xml_options`;
193 CREATE TABLE `b2b_xml_options` (
194 `b2b_xml_option_code` VARCHAR(255) NOT NULL,
195 `b2b_xml_parameter_name` VARCHAR(255) NOT NULL,
196 `b2b_xml_parameter_type` ENUM('REQUIRED', 'ABSENT') NULL,
197 `b2b_xml_parameter_value` ENUM('YES', 'NO', 'REQUIRED') NULL,
198 INDEX `idx_b2b_xml_options` (`b2b_xml_option_code` ASC))
199 ENGINE = InnoDB;
200
201 DROP TABLE IF EXISTS `b2b_xml_options_lang`;
202 CREATE TABLE `b2b_xml_options_lang` (
203 `b2b_xml_option_code` VARCHAR(255) NOT NULL,
204 `lang_iso` VARCHAR(2) NULL,
205 `option_lang_name` VARCHAR(255) NULL,
206 INDEX `idx_b2b_xml_options_lang` (`b2b_xml_option_code` ASC),
207 CONSTRAINT `fk_options_lang_options`
208 FOREIGN KEY (`b2b_xml_option_code`)
209 REFERENCES `b2b_xml_options` (`b2b_xml_option_code`)
210 ON DELETE NO ACTION
211 ON UPDATE NO ACTION)
212 ENGINE = InnoDB;
213
214 DROP TABLE IF EXISTS `b2b_xml_account_types`;
215 CREATE TABLE `b2b_xml_account_types` (
216 `b2b_xml_account_type_code` VARCHAR(255) NULL,
217 `b2b_xml_account_type_logo` VARCHAR(255) NULL,
218 PRIMARY KEY (`b2b_xml_account_type_code`))
219 ENGINE = InnoDB;
220
221 DROP TABLE IF EXISTS `b2b_xml_account_type_lang`;
222 CREATE TABLE `b2b_xml_account_type_lang` (
223 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
224 `lang_iso` VARCHAR(2) NULL,
225 `account_type_lang_name` VARCHAR(255) NULL,
226 INDEX `idx_b2b_xml_account_type_lang` (`b2b_xml_account_type_code` ASC),
227 CONSTRAINT `fk_account_type_lang_account_type_code`
228 FOREIGN KEY (`b2b_xml_account_type_code`)
229 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
230 ON DELETE NO ACTION
231 ON UPDATE NO ACTION)
232 ENGINE = InnoDB;
233
234 DROP TABLE IF EXISTS `b2b_xml_account_type_currency`;
235 CREATE TABLE `b2b_xml_account_type_currency` (
236 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
237 `currency_iso` VARCHAR(3) NOT NULL,
238 INDEX `idx_b2b_xml_account_type_currency` (`b2b_xml_account_type_code` ASC),
239 CONSTRAINT `fk_account_type_currency_account_types`
240 FOREIGN KEY (`b2b_xml_account_type_code`)
241 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
242 ON DELETE NO ACTION
243 ON UPDATE NO ACTION)
244 ENGINE = InnoDB;
245
246 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set`;
247 CREATE TABLE `b2b_xml_account_type_parameter_set` (
248 `id_b2b_xml_account_type_parameter_set` INT NOT NULL AUTO_INCREMENT,
249 `b2b_xml_account_type_parameter_set_version` VARCHAR(255) NULL,
250 `b2b_xml_account_type_parameter_set_logo` VARCHAR(255) NULL,
251 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
252 PRIMARY KEY (`id_b2b_xml_account_type_parameter_set`),
253 CONSTRAINT `fk_account_type_parameter_set_account_types`
254 FOREIGN KEY (`b2b_xml_account_type_code`)
255 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
256 ON DELETE NO ACTION
257 ON UPDATE NO ACTION)
258 ENGINE = InnoDB;
259
260 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_countries`;
261 CREATE TABLE `b2b_xml_account_type_parameter_set_countries` (
262 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
263 `country_iso` VARCHAR(2) NOT NULL,
264 INDEX `idx_b2b_xml_account_type_countries` (`id_b2b_xml_account_type_parameter_set` ASC),
265 CONSTRAINT `fk_account_type_parameter_set_countries_acnt_type_parameter_set`
266 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
267 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
268 ON DELETE NO ACTION
269 ON UPDATE NO ACTION)
270 ENGINE = InnoDB;
271
272 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_mode`;
273 CREATE TABLE `b2b_xml_account_type_parameter_set_mode` (
274 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
275 `b2b_xml_mode_code` VARCHAR(255) NOT NULL,
276 INDEX `idx_b2b_xml_account_type_parameter_set_mode` (`id_b2b_xml_account_type_parameter_set` ASC),
277 CONSTRAINT `fk_account_type_parameter_set_mode_modes_lang`
278 FOREIGN KEY (`b2b_xml_mode_code`)
279 REFERENCES `b2b_xml_modes_lang` (`b2b_xml_mode_code`)
280 ON DELETE NO ACTION
281 ON UPDATE NO ACTION,
282 CONSTRAINT `fk_account_type_parameter_set_mode_account_type_parameter_set`
283 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
284 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
285 ON DELETE NO ACTION
286 ON UPDATE NO ACTION)
287 ENGINE = InnoDB;
288
289 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_operation`;
290 CREATE TABLE `b2b_xml_account_type_parameter_set_operation` (
291 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
292 `b2b_xml_operation_code` VARCHAR(255) NOT NULL,
293 INDEX `fk_b2b_xml_account_type_parameter_set_operation_b2b_xml_acc_idx` (`id_b2b_xml_account_type_parameter_set` ASC),
294 CONSTRAINT `fk_account_type_parameter_set_operation_accnt_tpe_param_set`
295 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
296 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
297 ON DELETE NO ACTION
298 ON UPDATE NO ACTION,
299 CONSTRAINT `fk_account_type_parameter_set_operation_operation_lang`
300 FOREIGN KEY (`b2b_xml_operation_code`)
301 REFERENCES `b2b_xml_operation_lang` (`b2b_xml_operation_code`)
302 ON DELETE NO ACTION
303 ON UPDATE NO ACTION)
304 ENGINE = InnoDB;
305
306 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_parameters`;
307 CREATE TABLE `b2b_xml_account_type_parameter_set_parameters` (
308 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
309 `b2b_xml_parameter_name` VARCHAR(255) NOT NULL,
310 `b2b_xml_parameter_type` ENUM('REQUIRED', 'ABSENT') NULL,
311 `b2b_xml_parameter_value` ENUM('YES', 'NO', 'REQUIRED') NULL,
312 INDEX `idx_b2b_xml_account_type_parameter_set_parameters` (`id_b2b_xml_account_type_parameter_set` ASC),
313 CONSTRAINT `fk_account_type_parameter_set_parameters_accnt_tpe_param_set`
314 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
315 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
316 ON DELETE NO ACTION
317 ON UPDATE NO ACTION)
318 ENGINE = InnoDB;
319
320 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_options`;
321 CREATE TABLE IF NOT EXISTS `b2b_xml_account_type_parameter_set_options` (
322 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
323 `b2b_xml_option` VARCHAR(255) NOT NULL,
324 INDEX `idx_b2b_xml_account_type_parameter_set_options` (`id_b2b_xml_account_type_parameter_set` ASC),
325 CONSTRAINT `fk_account_type_parameter_set_options_account_type_parameter_set`
326 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
327 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
328 ON DELETE NO ACTION
329 ON UPDATE NO ACTION,
330 CONSTRAINT `fk_account_type_parameter_set_options_options`
331 FOREIGN KEY (`b2b_xml_option`)
332 REFERENCES `b2b_xml_options` (`b2b_xml_option_code`)
333 ON DELETE NO ACTION
334 ON UPDATE NO ACTION)
335 ENGINE = InnoDB;
336
337 DROP TABLE IF EXISTS `b2b_merchand_configuration_account`;
338 CREATE TABLE `b2b_merchand_configuration_account` (
339 `id_b2b_merchand_configuration_account` INT NOT NULL AUTO_INCREMENT,
340 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
341 `b2b_xml_mode_code` VARCHAR(255) NOT NULL,
342 `currency_iso` VARCHAR(3) NOT NULL,
343 `login` VARCHAR(255) NULL,
344 `password` VARCHAR(255) NULL,
345 `logo_url` VARCHAR(255) NULL,
346 `configuration_account_name` VARCHAR(255) NULL DEFAULT NULL,
347 `active` TINYINT(1) NULL,
348 `core_store_id` SMALLINT(5) unsigned NOT NULL,
349 PRIMARY KEY (`id_b2b_merchand_configuration_account`),
350 CONSTRAINT `fk_merchand_configuration_account_account_type_code`
351 FOREIGN KEY (`b2b_xml_account_type_code`)
352 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
353 ON DELETE NO ACTION
354 ON UPDATE NO ACTION,
355 CONSTRAINT `fk_merchand_configuration_account_modes_lang`
356 FOREIGN KEY (`b2b_xml_mode_code`)
357 REFERENCES `b2b_xml_modes_lang` (`b2b_xml_mode_code`)
358 ON DELETE NO ACTION
359 ON UPDATE NO ACTION,
360 CONSTRAINT `fk_merchand_configuration_account_core_store`
361 FOREIGN KEY (`core_store_id`)
362 REFERENCES `core_store` (`store_id`)
363 ON DELETE NO ACTION
364 ON UPDATE NO ACTION)
365 ENGINE = InnoDB;
366
367 DROP TABLE IF EXISTS `b2b_merchand_configuration_account_options`;
368 CREATE TABLE `b2b_merchand_configuration_account_options` (
369 `id_b2b_merchand_configuration_account_options` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
370 `id_b2b_merchand_configuration_account` INT NOT NULL,
371 `b2b_xml_option` VARCHAR(255) NOT NULL,
372 `min_amount` decimal(13,6) NULL DEFAULT NULL,
373 `max_amount` decimal(13,6) NULL DEFAULT NULL,
374 `b2b_xml_option_extra` VARCHAR(255) NOT NULL,
375 `active` TINYINT(1) NOT NULL,
376 PRIMARY KEY (`id_b2b_merchand_configuration_account_options`),
377 CONSTRAINT `fk_merchand_configuration_account_options_merchand_conf_accnt`
378 FOREIGN KEY (`id_b2b_merchand_configuration_account`)
379 REFERENCES `b2b_merchand_configuration_account` (`id_b2b_merchand_configuration_account`)
380 ON DELETE NO ACTION
381 ON UPDATE NO ACTION)
382 ENGINE = InnoDB;
383
384 DROP TABLE IF EXISTS `b2b_merchand_configuration_account_countries`;
385 CREATE TABLE `b2b_merchand_configuration_account_countries` (
386 `id_b2b_merchand_configuration_account_countries` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
387 `id_b2b_merchand_configuration_account` INT NOT NULL,
388 `country_iso` VARCHAR(2) NULL,
389 PRIMARY KEY (`id_b2b_merchand_configuration_account_countries`),
390 CONSTRAINT `fk_merchand_configuration_account_countries_merchand_conf_accnt`
391 FOREIGN KEY (`id_b2b_merchand_configuration_account`)
392 REFERENCES `b2b_merchand_configuration_account` (`id_b2b_merchand_configuration_account`)
393 ON DELETE NO ACTION
394 ON UPDATE NO ACTION)
395 ENGINE = InnoDB;
396
397 DROP TABLE IF EXISTS `b2b_alias`;
398 CREATE TABLE `b2b_alias` (
399 `id_b2b_alias` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
400 `id_customer` INT(10) UNSIGNED NOT NULL,
401 `id_merchand_account` INT(10) NOT NULL,
402 `alias` VARCHAR(255) NOT NULL,
403 `card_type` VARCHAR(255) NOT NULL,
404 `card_number` VARCHAR(255) NOT NULL,
405 `date_add` DATETIME NOT NULL,
406 `date_end` DATETIME NOT NULL,
407 PRIMARY KEY (`id_b2b_alias`),
408 CONSTRAINT `fk_alias_customer_entity`
409 FOREIGN KEY (`id_customer`)
410 REFERENCES `customer_entity` (`entity_id`)
411 ON DELETE CASCADE
412 ON UPDATE CASCADE,
413 CONSTRAINT `fk_alias_merchand_configuration_account`
414 FOREIGN KEY (`id_merchand_account`)
415 REFERENCES `b2b_merchand_configuration_account` (`id_b2b_merchand_configuration_account`)
416 ON DELETE CASCADE
417 ON UPDATE CASCADE)
418 ENGINE = InnoDB;
419
420 SET FOREIGN_KEY_CHECKS=1;
421
422 )
423
424 )
425
426 [9] => Array
427 (
428 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/core/Mage/Core/Model/Resource/Setup.php
429 [line] => 933
430 [function] => multiQuery
431 [class] => Varien_Db_Adapter_Pdo_Mysql
432 [type] => ->
433 [args] => Array
434 (
435 [0] =>
436 SET FOREIGN_KEY_CHECKS=0;
437
438 DROP TABLE IF EXISTS `b2b_xml_modes_lang`;
439 CREATE TABLE `b2b_xml_modes_lang` (
440 `b2b_xml_mode_code` VARCHAR(255) NOT NULL,
441 `lang_iso` VARCHAR(2) NULL,
442 `mode_lang_name` VARCHAR(255) NULL,
443 INDEX `idx_b2b_xml_modes_lang` (`b2b_xml_mode_code` ASC))
444 ENGINE = InnoDB;
445
446 DROP TABLE IF EXISTS `b2b_xml_operation_lang`;
447 CREATE TABLE `b2b_xml_operation_lang` (
448 `b2b_xml_operation_code` VARCHAR(255) NOT NULL,
449 `lang_iso` VARCHAR(2) NULL,
450 `operation_lang_name` VARCHAR(255) NULL,
451 INDEX `idx_b2b_xml_operation_lang` (`b2b_xml_operation_code` ASC))
452 ENGINE = InnoDB;
453
454 DROP TABLE IF EXISTS `b2b_xml_options`;
455 CREATE TABLE `b2b_xml_options` (
456 `b2b_xml_option_code` VARCHAR(255) NOT NULL,
457 `b2b_xml_parameter_name` VARCHAR(255) NOT NULL,
458 `b2b_xml_parameter_type` ENUM('REQUIRED', 'ABSENT') NULL,
459 `b2b_xml_parameter_value` ENUM('YES', 'NO', 'REQUIRED') NULL,
460 INDEX `idx_b2b_xml_options` (`b2b_xml_option_code` ASC))
461 ENGINE = InnoDB;
462
463 DROP TABLE IF EXISTS `b2b_xml_options_lang`;
464 CREATE TABLE `b2b_xml_options_lang` (
465 `b2b_xml_option_code` VARCHAR(255) NOT NULL,
466 `lang_iso` VARCHAR(2) NULL,
467 `option_lang_name` VARCHAR(255) NULL,
468 INDEX `idx_b2b_xml_options_lang` (`b2b_xml_option_code` ASC),
469 CONSTRAINT `fk_options_lang_options`
470 FOREIGN KEY (`b2b_xml_option_code`)
471 REFERENCES `b2b_xml_options` (`b2b_xml_option_code`)
472 ON DELETE NO ACTION
473 ON UPDATE NO ACTION)
474 ENGINE = InnoDB;
475
476 DROP TABLE IF EXISTS `b2b_xml_account_types`;
477 CREATE TABLE `b2b_xml_account_types` (
478 `b2b_xml_account_type_code` VARCHAR(255) NULL,
479 `b2b_xml_account_type_logo` VARCHAR(255) NULL,
480 PRIMARY KEY (`b2b_xml_account_type_code`))
481 ENGINE = InnoDB;
482
483 DROP TABLE IF EXISTS `b2b_xml_account_type_lang`;
484 CREATE TABLE `b2b_xml_account_type_lang` (
485 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
486 `lang_iso` VARCHAR(2) NULL,
487 `account_type_lang_name` VARCHAR(255) NULL,
488 INDEX `idx_b2b_xml_account_type_lang` (`b2b_xml_account_type_code` ASC),
489 CONSTRAINT `fk_account_type_lang_account_type_code`
490 FOREIGN KEY (`b2b_xml_account_type_code`)
491 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
492 ON DELETE NO ACTION
493 ON UPDATE NO ACTION)
494 ENGINE = InnoDB;
495
496 DROP TABLE IF EXISTS `b2b_xml_account_type_currency`;
497 CREATE TABLE `b2b_xml_account_type_currency` (
498 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
499 `currency_iso` VARCHAR(3) NOT NULL,
500 INDEX `idx_b2b_xml_account_type_currency` (`b2b_xml_account_type_code` ASC),
501 CONSTRAINT `fk_account_type_currency_account_types`
502 FOREIGN KEY (`b2b_xml_account_type_code`)
503 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
504 ON DELETE NO ACTION
505 ON UPDATE NO ACTION)
506 ENGINE = InnoDB;
507
508 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set`;
509 CREATE TABLE `b2b_xml_account_type_parameter_set` (
510 `id_b2b_xml_account_type_parameter_set` INT NOT NULL AUTO_INCREMENT,
511 `b2b_xml_account_type_parameter_set_version` VARCHAR(255) NULL,
512 `b2b_xml_account_type_parameter_set_logo` VARCHAR(255) NULL,
513 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
514 PRIMARY KEY (`id_b2b_xml_account_type_parameter_set`),
515 CONSTRAINT `fk_account_type_parameter_set_account_types`
516 FOREIGN KEY (`b2b_xml_account_type_code`)
517 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
518 ON DELETE NO ACTION
519 ON UPDATE NO ACTION)
520 ENGINE = InnoDB;
521
522 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_countries`;
523 CREATE TABLE `b2b_xml_account_type_parameter_set_countries` (
524 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
525 `country_iso` VARCHAR(2) NOT NULL,
526 INDEX `idx_b2b_xml_account_type_countries` (`id_b2b_xml_account_type_parameter_set` ASC),
527 CONSTRAINT `fk_account_type_parameter_set_countries_acnt_type_parameter_set`
528 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
529 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
530 ON DELETE NO ACTION
531 ON UPDATE NO ACTION)
532 ENGINE = InnoDB;
533
534 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_mode`;
535 CREATE TABLE `b2b_xml_account_type_parameter_set_mode` (
536 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
537 `b2b_xml_mode_code` VARCHAR(255) NOT NULL,
538 INDEX `idx_b2b_xml_account_type_parameter_set_mode` (`id_b2b_xml_account_type_parameter_set` ASC),
539 CONSTRAINT `fk_account_type_parameter_set_mode_modes_lang`
540 FOREIGN KEY (`b2b_xml_mode_code`)
541 REFERENCES `b2b_xml_modes_lang` (`b2b_xml_mode_code`)
542 ON DELETE NO ACTION
543 ON UPDATE NO ACTION,
544 CONSTRAINT `fk_account_type_parameter_set_mode_account_type_parameter_set`
545 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
546 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
547 ON DELETE NO ACTION
548 ON UPDATE NO ACTION)
549 ENGINE = InnoDB;
550
551 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_operation`;
552 CREATE TABLE `b2b_xml_account_type_parameter_set_operation` (
553 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
554 `b2b_xml_operation_code` VARCHAR(255) NOT NULL,
555 INDEX `fk_b2b_xml_account_type_parameter_set_operation_b2b_xml_acc_idx` (`id_b2b_xml_account_type_parameter_set` ASC),
556 CONSTRAINT `fk_account_type_parameter_set_operation_accnt_tpe_param_set`
557 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
558 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
559 ON DELETE NO ACTION
560 ON UPDATE NO ACTION,
561 CONSTRAINT `fk_account_type_parameter_set_operation_operation_lang`
562 FOREIGN KEY (`b2b_xml_operation_code`)
563 REFERENCES `b2b_xml_operation_lang` (`b2b_xml_operation_code`)
564 ON DELETE NO ACTION
565 ON UPDATE NO ACTION)
566 ENGINE = InnoDB;
567
568 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_parameters`;
569 CREATE TABLE `b2b_xml_account_type_parameter_set_parameters` (
570 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
571 `b2b_xml_parameter_name` VARCHAR(255) NOT NULL,
572 `b2b_xml_parameter_type` ENUM('REQUIRED', 'ABSENT') NULL,
573 `b2b_xml_parameter_value` ENUM('YES', 'NO', 'REQUIRED') NULL,
574 INDEX `idx_b2b_xml_account_type_parameter_set_parameters` (`id_b2b_xml_account_type_parameter_set` ASC),
575 CONSTRAINT `fk_account_type_parameter_set_parameters_accnt_tpe_param_set`
576 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
577 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
578 ON DELETE NO ACTION
579 ON UPDATE NO ACTION)
580 ENGINE = InnoDB;
581
582 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_options`;
583 CREATE TABLE IF NOT EXISTS `b2b_xml_account_type_parameter_set_options` (
584 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
585 `b2b_xml_option` VARCHAR(255) NOT NULL,
586 INDEX `idx_b2b_xml_account_type_parameter_set_options` (`id_b2b_xml_account_type_parameter_set` ASC),
587 CONSTRAINT `fk_account_type_parameter_set_options_account_type_parameter_set`
588 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
589 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
590 ON DELETE NO ACTION
591 ON UPDATE NO ACTION,
592 CONSTRAINT `fk_account_type_parameter_set_options_options`
593 FOREIGN KEY (`b2b_xml_option`)
594 REFERENCES `b2b_xml_options` (`b2b_xml_option_code`)
595 ON DELETE NO ACTION
596 ON UPDATE NO ACTION)
597 ENGINE = InnoDB;
598
599 DROP TABLE IF EXISTS `b2b_merchand_configuration_account`;
600 CREATE TABLE `b2b_merchand_configuration_account` (
601 `id_b2b_merchand_configuration_account` INT NOT NULL AUTO_INCREMENT,
602 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
603 `b2b_xml_mode_code` VARCHAR(255) NOT NULL,
604 `currency_iso` VARCHAR(3) NOT NULL,
605 `login` VARCHAR(255) NULL,
606 `password` VARCHAR(255) NULL,
607 `logo_url` VARCHAR(255) NULL,
608 `configuration_account_name` VARCHAR(255) NULL DEFAULT NULL,
609 `active` TINYINT(1) NULL,
610 `core_store_id` SMALLINT(5) unsigned NOT NULL,
611 PRIMARY KEY (`id_b2b_merchand_configuration_account`),
612 CONSTRAINT `fk_merchand_configuration_account_account_type_code`
613 FOREIGN KEY (`b2b_xml_account_type_code`)
614 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
615 ON DELETE NO ACTION
616 ON UPDATE NO ACTION,
617 CONSTRAINT `fk_merchand_configuration_account_modes_lang`
618 FOREIGN KEY (`b2b_xml_mode_code`)
619 REFERENCES `b2b_xml_modes_lang` (`b2b_xml_mode_code`)
620 ON DELETE NO ACTION
621 ON UPDATE NO ACTION,
622 CONSTRAINT `fk_merchand_configuration_account_core_store`
623 FOREIGN KEY (`core_store_id`)
624 REFERENCES `core_store` (`store_id`)
625 ON DELETE NO ACTION
626 ON UPDATE NO ACTION)
627 ENGINE = InnoDB;
628
629 DROP TABLE IF EXISTS `b2b_merchand_configuration_account_options`;
630 CREATE TABLE `b2b_merchand_configuration_account_options` (
631 `id_b2b_merchand_configuration_account_options` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
632 `id_b2b_merchand_configuration_account` INT NOT NULL,
633 `b2b_xml_option` VARCHAR(255) NOT NULL,
634 `min_amount` decimal(13,6) NULL DEFAULT NULL,
635 `max_amount` decimal(13,6) NULL DEFAULT NULL,
636 `b2b_xml_option_extra` VARCHAR(255) NOT NULL,
637 `active` TINYINT(1) NOT NULL,
638 PRIMARY KEY (`id_b2b_merchand_configuration_account_options`),
639 CONSTRAINT `fk_merchand_configuration_account_options_merchand_conf_accnt`
640 FOREIGN KEY (`id_b2b_merchand_configuration_account`)
641 REFERENCES `b2b_merchand_configuration_account` (`id_b2b_merchand_configuration_account`)
642 ON DELETE NO ACTION
643 ON UPDATE NO ACTION)
644 ENGINE = InnoDB;
645
646 DROP TABLE IF EXISTS `b2b_merchand_configuration_account_countries`;
647 CREATE TABLE `b2b_merchand_configuration_account_countries` (
648 `id_b2b_merchand_configuration_account_countries` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
649 `id_b2b_merchand_configuration_account` INT NOT NULL,
650 `country_iso` VARCHAR(2) NULL,
651 PRIMARY KEY (`id_b2b_merchand_configuration_account_countries`),
652 CONSTRAINT `fk_merchand_configuration_account_countries_merchand_conf_accnt`
653 FOREIGN KEY (`id_b2b_merchand_configuration_account`)
654 REFERENCES `b2b_merchand_configuration_account` (`id_b2b_merchand_configuration_account`)
655 ON DELETE NO ACTION
656 ON UPDATE NO ACTION)
657 ENGINE = InnoDB;
658
659 DROP TABLE IF EXISTS `b2b_alias`;
660 CREATE TABLE `b2b_alias` (
661 `id_b2b_alias` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
662 `id_customer` INT(10) UNSIGNED NOT NULL,
663 `id_merchand_account` INT(10) NOT NULL,
664 `alias` VARCHAR(255) NOT NULL,
665 `card_type` VARCHAR(255) NOT NULL,
666 `card_number` VARCHAR(255) NOT NULL,
667 `date_add` DATETIME NOT NULL,
668 `date_end` DATETIME NOT NULL,
669 PRIMARY KEY (`id_b2b_alias`),
670 CONSTRAINT `fk_alias_customer_entity`
671 FOREIGN KEY (`id_customer`)
672 REFERENCES `customer_entity` (`entity_id`)
673 ON DELETE CASCADE
674 ON UPDATE CASCADE,
675 CONSTRAINT `fk_alias_merchand_configuration_account`
676 FOREIGN KEY (`id_merchand_account`)
677 REFERENCES `b2b_merchand_configuration_account` (`id_b2b_merchand_configuration_account`)
678 ON DELETE CASCADE
679 ON UPDATE CASCADE)
680 ENGINE = InnoDB;
681
682 SET FOREIGN_KEY_CHECKS=1;
683
684 )
685
686 )
687
688 [10] => Array
689 (
690 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/community/Quadra/Be2bill/sql/be2bill_setup/mysql4-upgrade-4.0.0-4.1.0.php
691 [line] => 270
692 [function] => run
693 [class] => Mage_Core_Model_Resource_Setup
694 [type] => ->
695 [args] => Array
696 (
697 [0] =>
698 SET FOREIGN_KEY_CHECKS=0;
699
700 DROP TABLE IF EXISTS `b2b_xml_modes_lang`;
701 CREATE TABLE `b2b_xml_modes_lang` (
702 `b2b_xml_mode_code` VARCHAR(255) NOT NULL,
703 `lang_iso` VARCHAR(2) NULL,
704 `mode_lang_name` VARCHAR(255) NULL,
705 INDEX `idx_b2b_xml_modes_lang` (`b2b_xml_mode_code` ASC))
706 ENGINE = InnoDB;
707
708 DROP TABLE IF EXISTS `b2b_xml_operation_lang`;
709 CREATE TABLE `b2b_xml_operation_lang` (
710 `b2b_xml_operation_code` VARCHAR(255) NOT NULL,
711 `lang_iso` VARCHAR(2) NULL,
712 `operation_lang_name` VARCHAR(255) NULL,
713 INDEX `idx_b2b_xml_operation_lang` (`b2b_xml_operation_code` ASC))
714 ENGINE = InnoDB;
715
716 DROP TABLE IF EXISTS `b2b_xml_options`;
717 CREATE TABLE `b2b_xml_options` (
718 `b2b_xml_option_code` VARCHAR(255) NOT NULL,
719 `b2b_xml_parameter_name` VARCHAR(255) NOT NULL,
720 `b2b_xml_parameter_type` ENUM('REQUIRED', 'ABSENT') NULL,
721 `b2b_xml_parameter_value` ENUM('YES', 'NO', 'REQUIRED') NULL,
722 INDEX `idx_b2b_xml_options` (`b2b_xml_option_code` ASC))
723 ENGINE = InnoDB;
724
725 DROP TABLE IF EXISTS `b2b_xml_options_lang`;
726 CREATE TABLE `b2b_xml_options_lang` (
727 `b2b_xml_option_code` VARCHAR(255) NOT NULL,
728 `lang_iso` VARCHAR(2) NULL,
729 `option_lang_name` VARCHAR(255) NULL,
730 INDEX `idx_b2b_xml_options_lang` (`b2b_xml_option_code` ASC),
731 CONSTRAINT `fk_options_lang_options`
732 FOREIGN KEY (`b2b_xml_option_code`)
733 REFERENCES `b2b_xml_options` (`b2b_xml_option_code`)
734 ON DELETE NO ACTION
735 ON UPDATE NO ACTION)
736 ENGINE = InnoDB;
737
738 DROP TABLE IF EXISTS `b2b_xml_account_types`;
739 CREATE TABLE `b2b_xml_account_types` (
740 `b2b_xml_account_type_code` VARCHAR(255) NULL,
741 `b2b_xml_account_type_logo` VARCHAR(255) NULL,
742 PRIMARY KEY (`b2b_xml_account_type_code`))
743 ENGINE = InnoDB;
744
745 DROP TABLE IF EXISTS `b2b_xml_account_type_lang`;
746 CREATE TABLE `b2b_xml_account_type_lang` (
747 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
748 `lang_iso` VARCHAR(2) NULL,
749 `account_type_lang_name` VARCHAR(255) NULL,
750 INDEX `idx_b2b_xml_account_type_lang` (`b2b_xml_account_type_code` ASC),
751 CONSTRAINT `fk_account_type_lang_account_type_code`
752 FOREIGN KEY (`b2b_xml_account_type_code`)
753 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
754 ON DELETE NO ACTION
755 ON UPDATE NO ACTION)
756 ENGINE = InnoDB;
757
758 DROP TABLE IF EXISTS `b2b_xml_account_type_currency`;
759 CREATE TABLE `b2b_xml_account_type_currency` (
760 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
761 `currency_iso` VARCHAR(3) NOT NULL,
762 INDEX `idx_b2b_xml_account_type_currency` (`b2b_xml_account_type_code` ASC),
763 CONSTRAINT `fk_account_type_currency_account_types`
764 FOREIGN KEY (`b2b_xml_account_type_code`)
765 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
766 ON DELETE NO ACTION
767 ON UPDATE NO ACTION)
768 ENGINE = InnoDB;
769
770 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set`;
771 CREATE TABLE `b2b_xml_account_type_parameter_set` (
772 `id_b2b_xml_account_type_parameter_set` INT NOT NULL AUTO_INCREMENT,
773 `b2b_xml_account_type_parameter_set_version` VARCHAR(255) NULL,
774 `b2b_xml_account_type_parameter_set_logo` VARCHAR(255) NULL,
775 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
776 PRIMARY KEY (`id_b2b_xml_account_type_parameter_set`),
777 CONSTRAINT `fk_account_type_parameter_set_account_types`
778 FOREIGN KEY (`b2b_xml_account_type_code`)
779 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
780 ON DELETE NO ACTION
781 ON UPDATE NO ACTION)
782 ENGINE = InnoDB;
783
784 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_countries`;
785 CREATE TABLE `b2b_xml_account_type_parameter_set_countries` (
786 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
787 `country_iso` VARCHAR(2) NOT NULL,
788 INDEX `idx_b2b_xml_account_type_countries` (`id_b2b_xml_account_type_parameter_set` ASC),
789 CONSTRAINT `fk_account_type_parameter_set_countries_acnt_type_parameter_set`
790 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
791 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
792 ON DELETE NO ACTION
793 ON UPDATE NO ACTION)
794 ENGINE = InnoDB;
795
796 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_mode`;
797 CREATE TABLE `b2b_xml_account_type_parameter_set_mode` (
798 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
799 `b2b_xml_mode_code` VARCHAR(255) NOT NULL,
800 INDEX `idx_b2b_xml_account_type_parameter_set_mode` (`id_b2b_xml_account_type_parameter_set` ASC),
801 CONSTRAINT `fk_account_type_parameter_set_mode_modes_lang`
802 FOREIGN KEY (`b2b_xml_mode_code`)
803 REFERENCES `b2b_xml_modes_lang` (`b2b_xml_mode_code`)
804 ON DELETE NO ACTION
805 ON UPDATE NO ACTION,
806 CONSTRAINT `fk_account_type_parameter_set_mode_account_type_parameter_set`
807 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
808 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
809 ON DELETE NO ACTION
810 ON UPDATE NO ACTION)
811 ENGINE = InnoDB;
812
813 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_operation`;
814 CREATE TABLE `b2b_xml_account_type_parameter_set_operation` (
815 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
816 `b2b_xml_operation_code` VARCHAR(255) NOT NULL,
817 INDEX `fk_b2b_xml_account_type_parameter_set_operation_b2b_xml_acc_idx` (`id_b2b_xml_account_type_parameter_set` ASC),
818 CONSTRAINT `fk_account_type_parameter_set_operation_accnt_tpe_param_set`
819 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
820 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
821 ON DELETE NO ACTION
822 ON UPDATE NO ACTION,
823 CONSTRAINT `fk_account_type_parameter_set_operation_operation_lang`
824 FOREIGN KEY (`b2b_xml_operation_code`)
825 REFERENCES `b2b_xml_operation_lang` (`b2b_xml_operation_code`)
826 ON DELETE NO ACTION
827 ON UPDATE NO ACTION)
828 ENGINE = InnoDB;
829
830 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_parameters`;
831 CREATE TABLE `b2b_xml_account_type_parameter_set_parameters` (
832 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
833 `b2b_xml_parameter_name` VARCHAR(255) NOT NULL,
834 `b2b_xml_parameter_type` ENUM('REQUIRED', 'ABSENT') NULL,
835 `b2b_xml_parameter_value` ENUM('YES', 'NO', 'REQUIRED') NULL,
836 INDEX `idx_b2b_xml_account_type_parameter_set_parameters` (`id_b2b_xml_account_type_parameter_set` ASC),
837 CONSTRAINT `fk_account_type_parameter_set_parameters_accnt_tpe_param_set`
838 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
839 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
840 ON DELETE NO ACTION
841 ON UPDATE NO ACTION)
842 ENGINE = InnoDB;
843
844 DROP TABLE IF EXISTS `b2b_xml_account_type_parameter_set_options`;
845 CREATE TABLE IF NOT EXISTS `b2b_xml_account_type_parameter_set_options` (
846 `id_b2b_xml_account_type_parameter_set` INT NOT NULL,
847 `b2b_xml_option` VARCHAR(255) NOT NULL,
848 INDEX `idx_b2b_xml_account_type_parameter_set_options` (`id_b2b_xml_account_type_parameter_set` ASC),
849 CONSTRAINT `fk_account_type_parameter_set_options_account_type_parameter_set`
850 FOREIGN KEY (`id_b2b_xml_account_type_parameter_set`)
851 REFERENCES `b2b_xml_account_type_parameter_set` (`id_b2b_xml_account_type_parameter_set`)
852 ON DELETE NO ACTION
853 ON UPDATE NO ACTION,
854 CONSTRAINT `fk_account_type_parameter_set_options_options`
855 FOREIGN KEY (`b2b_xml_option`)
856 REFERENCES `b2b_xml_options` (`b2b_xml_option_code`)
857 ON DELETE NO ACTION
858 ON UPDATE NO ACTION)
859 ENGINE = InnoDB;
860
861 DROP TABLE IF EXISTS `b2b_merchand_configuration_account`;
862 CREATE TABLE `b2b_merchand_configuration_account` (
863 `id_b2b_merchand_configuration_account` INT NOT NULL AUTO_INCREMENT,
864 `b2b_xml_account_type_code` VARCHAR(255) NOT NULL,
865 `b2b_xml_mode_code` VARCHAR(255) NOT NULL,
866 `currency_iso` VARCHAR(3) NOT NULL,
867 `login` VARCHAR(255) NULL,
868 `password` VARCHAR(255) NULL,
869 `logo_url` VARCHAR(255) NULL,
870 `configuration_account_name` VARCHAR(255) NULL DEFAULT NULL,
871 `active` TINYINT(1) NULL,
872 `core_store_id` SMALLINT(5) unsigned NOT NULL,
873 PRIMARY KEY (`id_b2b_merchand_configuration_account`),
874 CONSTRAINT `fk_merchand_configuration_account_account_type_code`
875 FOREIGN KEY (`b2b_xml_account_type_code`)
876 REFERENCES `b2b_xml_account_types` (`b2b_xml_account_type_code`)
877 ON DELETE NO ACTION
878 ON UPDATE NO ACTION,
879 CONSTRAINT `fk_merchand_configuration_account_modes_lang`
880 FOREIGN KEY (`b2b_xml_mode_code`)
881 REFERENCES `b2b_xml_modes_lang` (`b2b_xml_mode_code`)
882 ON DELETE NO ACTION
883 ON UPDATE NO ACTION,
884 CONSTRAINT `fk_merchand_configuration_account_core_store`
885 FOREIGN KEY (`core_store_id`)
886 REFERENCES `core_store` (`store_id`)
887 ON DELETE NO ACTION
888 ON UPDATE NO ACTION)
889 ENGINE = InnoDB;
890
891 DROP TABLE IF EXISTS `b2b_merchand_configuration_account_options`;
892 CREATE TABLE `b2b_merchand_configuration_account_options` (
893 `id_b2b_merchand_configuration_account_options` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
894 `id_b2b_merchand_configuration_account` INT NOT NULL,
895 `b2b_xml_option` VARCHAR(255) NOT NULL,
896 `min_amount` decimal(13,6) NULL DEFAULT NULL,
897 `max_amount` decimal(13,6) NULL DEFAULT NULL,
898 `b2b_xml_option_extra` VARCHAR(255) NOT NULL,
899 `active` TINYINT(1) NOT NULL,
900 PRIMARY KEY (`id_b2b_merchand_configuration_account_options`),
901 CONSTRAINT `fk_merchand_configuration_account_options_merchand_conf_accnt`
902 FOREIGN KEY (`id_b2b_merchand_configuration_account`)
903 REFERENCES `b2b_merchand_configuration_account` (`id_b2b_merchand_configuration_account`)
904 ON DELETE NO ACTION
905 ON UPDATE NO ACTION)
906 ENGINE = InnoDB;
907
908 DROP TABLE IF EXISTS `b2b_merchand_configuration_account_countries`;
909 CREATE TABLE `b2b_merchand_configuration_account_countries` (
910 `id_b2b_merchand_configuration_account_countries` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
911 `id_b2b_merchand_configuration_account` INT NOT NULL,
912 `country_iso` VARCHAR(2) NULL,
913 PRIMARY KEY (`id_b2b_merchand_configuration_account_countries`),
914 CONSTRAINT `fk_merchand_configuration_account_countries_merchand_conf_accnt`
915 FOREIGN KEY (`id_b2b_merchand_configuration_account`)
916 REFERENCES `b2b_merchand_configuration_account` (`id_b2b_merchand_configuration_account`)
917 ON DELETE NO ACTION
918 ON UPDATE NO ACTION)
919 ENGINE = InnoDB;
920
921 DROP TABLE IF EXISTS `b2b_alias`;
922 CREATE TABLE `b2b_alias` (
923 `id_b2b_alias` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
924 `id_customer` INT(10) UNSIGNED NOT NULL,
925 `id_merchand_account` INT(10) NOT NULL,
926 `alias` VARCHAR(255) NOT NULL,
927 `card_type` VARCHAR(255) NOT NULL,
928 `card_number` VARCHAR(255) NOT NULL,
929 `date_add` DATETIME NOT NULL,
930 `date_end` DATETIME NOT NULL,
931 PRIMARY KEY (`id_b2b_alias`),
932 CONSTRAINT `fk_alias_customer_entity`
933 FOREIGN KEY (`id_customer`)
934 REFERENCES `customer_entity` (`entity_id`)
935 ON DELETE CASCADE
936 ON UPDATE CASCADE,
937 CONSTRAINT `fk_alias_merchand_configuration_account`
938 FOREIGN KEY (`id_merchand_account`)
939 REFERENCES `b2b_merchand_configuration_account` (`id_b2b_merchand_configuration_account`)
940 ON DELETE CASCADE
941 ON UPDATE CASCADE)
942 ENGINE = InnoDB;
943
944 SET FOREIGN_KEY_CHECKS=1;
945
946 )
947
948 )
949
950 [11] => Array
951 (
952 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/core/Mage/Core/Model/Resource/Setup.php
953 [line] => 624
954 [args] => Array
955 (
956 [0] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/community/Quadra/Be2bill/sql/be2bill_setup/mysql4-upgrade-4.0.0-4.1.0.php
957 )
958
959 [function] => include
960 )
961
962 [12] => Array
963 (
964 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/core/Mage/Core/Model/Resource/Setup.php
965 [line] => 437
966 [function] => _modifyResourceDb
967 [class] => Mage_Core_Model_Resource_Setup
968 [type] => ->
969 [args] => Array
970 (
971 [0] => upgrade
972 [1] => 4.0.0
973 [2] => 5.0.8
974 )
975
976 )
977
978 [13] => Array
979 (
980 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/core/Mage/Core/Model/Resource/Setup.php
981 [line] => 320
982 [function] => _upgradeResourceDb
983 [class] => Mage_Core_Model_Resource_Setup
984 [type] => ->
985 [args] => Array
986 (
987 [0] => 4.0.0
988 [1] => 5.0.8
989 )
990
991 )
992
993 [14] => Array
994 (
995 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/core/Mage/Core/Model/Resource/Setup.php
996 [line] => 235
997 [function] => applyUpdates
998 [class] => Mage_Core_Model_Resource_Setup
999 [type] => ->
1000 [args] => Array
1001 (
1002 )
1003
1004 )
1005
1006 [15] => Array
1007 (
1008 [file] => /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/shell/dbUpdate.php
1009 [line] => 28
1010 [function] => applyAllUpdates
1011 [class] => Mage_Core_Model_Resource_Setup
1012 [type] => ::
1013 [args] => Array
1014 (
1015 )
1016
1017 )
1018
1019 )
1020
1021 [previous:Exception:private] =>
1022 [errorInfo] => Array
1023 (
1024 [0] => 42000
1025 [1] => 1171
1026 [2] => All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
1027 )
1028
1029)
1030</pre>
1031Fatal error: Uncaught exception 'Mage_Core_Exception' with message 'Error in file: "/Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/community/Quadra/Be2bill/sql/be2bill_setup/mysql4-upgrade-4.0.0-4.1.0.php" - SQLSTATE[42000]: Syntax error or access violation: 1171 All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead' in /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/Mage.php:582
1032Stack trace:
1033#0 /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
1034#1 /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '4.0.0', '5.0.8')
1035#2 /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('4.0.0', '5.0.8')
1036#3 /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingeri in /Volumes/MEDIA/PROJECT/DOCKER/apps/edition-lingerie/app/Mage.php on line 582
1037stanislavs-MacBook-Pro:shell stanislav.shylo$