Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029923Openbravo ERPA. Platformpublic2015-05-19 09:442015-06-04 15:45
alostale 
alostale 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR15Q33.0PR15Q3 
marvintm
Core
Automated tests
2015-04-28
pi
https://code.openbravo.com/erp/devel/pi/rev/f8c18a0c0a00d9dc01482bb1ca5b72d2c68c1fe3 [^]
No
0029923: upgrading from 2.50 to pi shows errors in update.database log
When upgrading from 2.50 to current pi, there are some errors in update.database log.
Install 2.50:
 hg clone pi
 hg up -C 2.50MP24
 ant install.source

Prepare to upgrade (fix some data):
  psql -c 'delete from C_BP_CUSTOMER_ACCT where C_BP_CUSTOMER_ACCT_id in ('\''1000020'\'', '\''1000019'\'', '\''1000024'\'', '\''1000022'\'', '\''1000021'\'');'

Upgrade
  ant smartbuild -Dlocal=no

These errors appear in the log:
     [java] 124879 INFO - Batch statement failed. Rolling back and retrying all the statements in a non-batched connection.
     [java] 124913 WARN - SQL Command failed with: ERROR: constraint "ad_createfact_template_ad_tabl" of relation "ad_createfact_template" does not exist
     [java] 124918 WARN - -- END
     [java] ALTER TABLE AD_CREATEFACT_TEMPLATE
     [java] DROP CONSTRAINT AD_CREATEFACT_TEMPLATE_AD_TABL
     [java] 125102 WARN - SQL Command failed with: ERROR: constraint "ad_process_request_ad_process" of relation "ad_process_request" does not exist
     [java] 125129 WARN - -- END
     [java] ALTER TABLE AD_PROCESS_REQUEST
     [java] DROP CONSTRAINT AD_PROCESS_REQUEST_AD_PROCESS
     [java] 125259 WARN - SQL Command failed with: ERROR: constraint "fact_acct_ad_table" of relation "fact_acct" does not exist
     [java] 125274 WARN - -- END
     [java] ALTER TABLE FACT_ACCT
     [java] DROP CONSTRAINT FACT_ACCT_AD_TABLE

You can see this error in CI: https://ci.openbravo.com/job/up-2.50topi-pgsql/74/ [^]
No tags attached.
caused by feature request 0029270 closed alostale prevent table recreation in update.database 
related to defect 00299273.0PR15Q3 closed alostale export database after upgrade from 2.50 results in formal changes 
related to defect 00300163.0PR15Q3 closed alostale upgrading from 2.50 to pi some FKs are missing 
Issue History
2015-05-19 09:44alostaleNew Issue
2015-05-19 09:44alostaleAssigned To => platform
2015-05-19 09:44alostaleModules => Core
2015-05-19 09:44alostaleRegression level => Coding ( Testing )
2015-05-19 09:44alostaleRegression date => 2015-04-28
2015-05-19 09:44alostaleRegression introduced in release => pi
2015-05-19 09:44alostaleRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/f8c18a0c0a00d9dc01482bb1ca5b72d2c68c1fe3 [^]
2015-05-19 09:44alostaleTriggers an Emergency Pack => No
2015-05-19 09:45alostaleRegression levelCoding ( Testing ) => Automated tests
2015-05-19 09:45alostaleRelationship addedcaused by 0029270
2015-05-19 09:50alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8572#r8572
2015-05-19 10:16alostaleRelationship addedrelated to 0029927
2015-05-19 10:17alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8577#r8577
2015-05-19 10:18alostaleSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8578#r8578
2015-05-19 12:39shuehnerIssue Monitored: shuehner
2015-05-26 12:39hgbotCheckin
2015-05-26 12:39hgbotNote Added: 0077754
2015-05-26 12:46alostaleReview Assigned To => marvintm
2015-05-26 12:46alostaleStatusnew => scheduled
2015-05-26 13:51hgbotCheckin
2015-05-26 13:51hgbotNote Added: 0077757
2015-05-26 13:51hgbotStatusscheduled => resolved
2015-05-26 13:51hgbotResolutionopen => fixed
2015-05-26 13:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/94360b8e364e9d9fe1513df418366970a71a66f0 [^]
2015-05-26 13:52hgbotCheckin
2015-05-26 13:52hgbotNote Added: 0077758
2015-05-26 13:52hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/94360b8e364e9d9fe1513df418366970a71a66f0 [^] => http://code.openbravo.com/erp/devel/pi/rev/76e6524fe91c3df5e6068e5c3726616ff94e2123 [^]
2015-05-26 15:08alostaleRelationship addedrelated to 0030016
2015-05-26 15:08alostaleAssigned Toplatform => alostale
2015-05-27 00:39hudsonbotCheckin
2015-05-27 00:39hudsonbotNote Added: 0077780
2015-06-04 15:45marvintmStatusresolved => closed
2015-06-04 15:45marvintmFixed in Version => 3.0PR15Q3

Notes
(0077754)
hgbot   
2015-05-26 12:39   
Repository: erp/devel/dbsm-main
Changeset: b5dc42ee72ef7a4608b33cd76295cbc61d3ccca0
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue May 26 12:38:57 2015 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/b5dc42ee72ef7a4608b33cd76295cbc61d3ccca0 [^]

related to bug 29923: upgrading from 2.50 to pi shows errors in update.database

  added test case

---
M src-test/src/org/openbravo/dbsm/test/model/recreation/OtherRecreations.java
A src-test/model/recreation/FK4.xml
A src-test/model/recreation/FK41.xml
---
(0077757)
hgbot   
2015-05-26 13:51   
Repository: erp/devel/dbsm-main
Changeset: 94360b8e364e9d9fe1513df418366970a71a66f0
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue May 26 12:52:33 2015 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/94360b8e364e9d9fe1513df418366970a71a66f0 [^]

fixed bug 29923: upgrading from 2.50 to pi shows errors in update.database

  This error ocurred when a non AD table with FKs to an AD table was recreated.

  In this situation FKs to AD table were tried to be dropped twice:
   - As part of the table recreation
   - As part of standard FK drop from non AD to AD tables

  The fix consists on not dropping FKs from non AD to AD tables for already recreated
  ones

---
M src/org/apache/ddlutils/platform/PlatformImplBase.java
---
(0077758)
hgbot   
2015-05-26 13:52   
Repository: erp/devel/pi
Changeset: 76e6524fe91c3df5e6068e5c3726616ff94e2123
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue May 26 13:51:31 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/76e6524fe91c3df5e6068e5c3726616ff94e2123 [^]

fixed bug 29923: upgrading from 2.50 to pi shows errors in update.database

  This error ocurred when a non AD table with FKs to an AD table was recreated.

  In this situation FKs to AD table were tried to be dropped twice:
   - As part of the table recreation
   - As part of standard FK drop from non AD to AD tables

  The fix consists on not dropping FKs from non AD to AD tables for already recreated
  ones

---
M src-db/database/lib/dbsourcemanager.jar
---
(0077780)
hudsonbot   
2015-05-27 00:39   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/2ac0a8fe23d2 [^]
Maturity status: Test