#1090 1.3->1.4 upgrade error: failure at upgrade script line 134

1.4
closed-fixed
nobody
None
5
2014-04-27
2014-03-17
Erik Huelsmann
No

From IRC, I've found this report - which indicates a problem with (class_id, control_code) key constraint. However, Ramjett indicates there are two meta_numbers by the value of '0059' and there is no control_code by the number '0059'.

[21:22] <Ramjett> psql:/tmp/ledgersmb/upgrade.sql:134: ERROR: duplicate key value violates unique constraint "business_unit_class_id_control_code_key"
[21:22] <Ramjett> DETAIL: Key (class_id, control_code)=(6, 0059) already exists.
[21:22] <Ramjett> CONTEXT: SQL statement "INSERT INTO business_unit(class_id, control_code, description, credit_id)
[21:22] <Ramjett> FROM entity e WHERE e.id = NEW.entity_id"
[21:22] <Ramjett> PL/pgSQL function "eca_bu_trigger" line 4 at SQL statement

And also:

[21:53] <Ramjett> SELECT id,entity_id,meta_number from entity_credit_account limit 5;
[21:54] <Ramjett> 1 | 0 | 00000
[21:54] <Ramjett> 2 | 0 | 00000
[21:54] <Ramjett> 4 | 4 | 0059
[21:54] <Ramjett> 47 | 50 | 0059
[21:54] <Ramjett> 6 | 6 | 0060

Discussion

  • Erik Huelsmann
    Erik Huelsmann
    2014-04-27

    • status: open --> closed-fixed
     
  • Erik Huelsmann
    Erik Huelsmann
    2014-04-27

    Committed an upgrade test to detect the problematic case.