Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0030016
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagermajorhave not tried2015-05-26 15:032015-06-04 15:44
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityimmediateResolutionfixedFixed in Version3.0PR15Q3
StatusclosedFix in branchFixed in SCM revisiond5d21a543e48
ProjectionnoneETAnoneTarget Version3.0PR15Q3
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tomarvintm
Web browser
ModulesCore
Regression levelAutomated tests
Regression date2015-04-28
Regression introduced in releasepi
Regression introduced by commithttps://code.openbravo.com/erp/devel/pi/rev/f8c18a0c0a00d9dc01482bb1ca5b72d2c68c1fe3 [^]
Triggers an Emergency PackNo
Summary

0030016: upgrading from 2.50 to pi some FKs are missing

DescriptionWhen upgrading from 2.50 to pi, some FKs are missing in the new database.

This occurs for the FKs from recreated to non recreated tables in case none of them are in AD and also in case the both tables participating in the FK are recreated depending on the order they are loaded in the model.
Steps To ReproduceInstall 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

Set all modules but template in development:
 psql -c 'update ad_module set isindevelopment='\''Y'\'' where ad_module_id<>'\''0138E7A89B5E4DC3932462252801FFBC'\'';'

Export database and check:
  ant export.database
  hg diff src-db/database/model/tables/MA_SEQUENCE_MACHINE.xmldiff -r b9ab1a7d0969 src-db/database/model/tables/MA_SEQUENCE_MACHINE.xml
--- a/src-db/database/model/tables/MA_SEQUENCE_MACHINE.xml Thu May 14 15:46:56 2015 +0000
+++ b/src-db/database/model/tables/MA_SEQUENCE_MACHINE.xml Tue May 26 15:01:04 2015 +0200
@@ -48,15 +48,6 @@
       <foreign-key foreignTable="AD_CLIENT" name="MA_SEQUENCE_MACHINE_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
- <foreign-key foreignTable="AD_ORG" name="MA_SEQUENCE_MACHINE_AD_ORG">
- <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
- </foreign-key>
- <foreign-key foreignTable="MA_MACHINE" name="MA_SEQUENCE_MACHINE_MA_MACHINE">
- <reference local="MA_MACHINE_ID" foreign="MA_MACHINE_ID"/>
- </foreign-key>
- <foreign-key foreignTable="MA_SEQUENCE" name="MA_SEQUENCE_MACHINE_MA_SEQUENC">
- <reference local="MA_SEQUENCE_ID" foreign="MA_SEQUENCE_ID"/>
- </foreign-key>
       <index name="MA_SEQUENCEMACHINE_SEQ_IDX" unique="false">
         <index-column name="MA_SEQUENCE_ID"/>
       </index>
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00299233.0PR15Q3 closedalostale upgrading from 2.50 to pi shows errors in update.database log 
caused by feature request 0029270 closedalostale prevent table recreation in update.database 

-  Notes
(0077814)
hgbot (developer)
2015-05-27 15:42

Repository: erp/devel/pi
Changeset: f46b56001fbd6e4484652b2cf8c93fed0d6625e3
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed May 27 15:41:58 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f46b56001fbd6e4484652b2cf8c93fed0d6625e3 [^]

fixed bug 30016: upgrading from 2.50 to pi some FKs are missing

  There were 2 scenarios where this occurred:
   * FKs from recreated to non recreated tables in case none of them are in AD
   * both tables participating in the FK are recreated and the referenced one
     is loaded before the referencing one in the model

---
M src-db/database/lib/dbsourcemanager.jar
---
(0077815)
hgbot (developer)
2015-05-27 15:43

Repository: erp/devel/dbsm-main
Changeset: d369daa5dda0a52109310b453143108afc63915d
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue May 26 15:13:15 2015 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/d369daa5dda0a52109310b453143108afc63915d [^]

related to bug 30016: upgrading from 2.50 to pi some FKs are missing

  added test case

---
M src-test/src/org/openbravo/dbsm/test/model/recreation/OtherRecreations.java
---
(0077816)
hgbot (developer)
2015-05-27 15:43

Repository: erp/devel/dbsm-main
Changeset: 386d20e998ca34f6af75a3665e09af65be42ae27
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed May 27 14:51:56 2015 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/386d20e998ca34f6af75a3665e09af65be42ae27 [^]

related to bug 30016: upgrading from 2.50 to pi some FKs are missing

  added more test cases covering different FK recreation scenarios

---
M src-test/src/org/openbravo/dbsm/test/model/recreation/OtherRecreations.java
A src-test/model/recreation/FK42.xml
A src-test/model/recreation/FK5.xml
A src-test/model/recreation/FK52.xml
---
(0077817)
hgbot (developer)
2015-05-27 15:43

Repository: erp/devel/dbsm-main
Changeset: d5d21a543e48b1f3302c207b4d6c172755349245
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed May 27 14:58:33 2015 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/d5d21a543e48b1f3302c207b4d6c172755349245 [^]

fixed bug 30016: upgrading from 2.50 to pi some FKs are missing

  There were 2 scenarios where this occurred:
   * FKs from recreated to non recreated tables in case none of them are in AD
   * both tables participating in the FK are recreated and the referenced one
     is loaded before the referencing one in the model

---
M src/org/apache/ddlutils/platform/PlatformImplBase.java
M src/org/apache/ddlutils/platform/SqlBuilder.java
---
(0077843)
hudsonbot (developer)
2015-05-28 01:10

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/ae25da3bd47f [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-05-26 15:03 alostale New Issue
2015-05-26 15:03 alostale Assigned To => platform
2015-05-26 15:03 alostale Modules => Core
2015-05-26 15:03 alostale Regression level => Automated tests
2015-05-26 15:03 alostale Regression date => 2015-04-28
2015-05-26 15:03 alostale Regression introduced in release => pi
2015-05-26 15:03 alostale Regression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/f8c18a0c0a00d9dc01482bb1ca5b72d2c68c1fe3 [^]
2015-05-26 15:03 alostale Triggers an Emergency Pack => No
2015-05-26 15:08 alostale Relationship added related to 0029923
2015-05-26 15:10 alostale Assigned To platform => alostale
2015-05-26 15:10 alostale Status new => scheduled
2015-05-26 15:10 alostale Summary 29923: upgrading from 2.50 to pi some FKs are missing => upgrading from 2.50 to pi some FKs are missing
2015-05-26 15:10 alostale Relationship added caused by 0029270
2015-05-27 14:55 alostale Description Updated View Revisions
2015-05-27 15:42 hgbot Checkin
2015-05-27 15:42 hgbot Note Added: 0077814
2015-05-27 15:42 hgbot Status scheduled => resolved
2015-05-27 15:42 hgbot Resolution open => fixed
2015-05-27 15:42 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/f46b56001fbd6e4484652b2cf8c93fed0d6625e3 [^]
2015-05-27 15:43 hgbot Checkin
2015-05-27 15:43 hgbot Note Added: 0077815
2015-05-27 15:43 hgbot Checkin
2015-05-27 15:43 hgbot Note Added: 0077816
2015-05-27 15:43 hgbot Checkin
2015-05-27 15:43 hgbot Note Added: 0077817
2015-05-27 15:43 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/f46b56001fbd6e4484652b2cf8c93fed0d6625e3 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/d5d21a543e48b1f3302c207b4d6c172755349245 [^]
2015-05-27 15:43 alostale Review Assigned To => marvintm
2015-05-28 01:10 hudsonbot Checkin
2015-05-28 01:10 hudsonbot Note Added: 0077843
2015-06-04 15:44 marvintm Status resolved => closed
2015-06-04 15:44 marvintm Fixed in Version => 3.0PR15Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker