Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028822Openbravo ERPY. DBSourceManagerpublic2015-01-30 12:592022-02-01 08:09
alostale 
Triage Platform Base 
normalminorhave not tried
acknowledgedopen 
5
 
 
AugustoMauch
Core
No
0028822: update.database.script is not reliable
update.database.script task logs a file with the sql statements that actual update.database would execute.

The problem is that it logs some commands that actual update.database will not execute. Example: actual update.database drops FKs only for those tables to be recreated and for the ones defined in the AD dataset whereas update.database.script logs statements to drop *all* FKs.

Though the script is still useful to understand the main actions done by update.database it is not reliable.
-execute ant update.datbase to syn DB with xml
-execute ant update.databse.script -Dbbdd.outputscript=/tmp/update.sql
   --> check all FK constrains are dropped and recreated
-set pg log to log all the statements in DB
-execute ant update.datbase
   --> check not all the FKs appearing in the script are actually dropped and recreated
Currently update.database.script duplicates actual update.database methods reimplementing them, this makes more difficult to maintain code because any change in update.database should be also ported to update.datbase.

These methods should be refactored to be maintained in a single place.
No tags attached.
related to feature request 0029270 closed alostale prevent table recreation in update.database 
Issue History
2015-01-30 12:59alostaleNew Issue
2015-01-30 12:59alostaleAssigned To => alostale
2015-01-30 12:59alostaleModules => Core
2015-01-30 12:59alostaleTriggers an Emergency Pack => No
2015-03-18 15:07alostaleStatusnew => scheduled
2015-03-18 15:08alostaleReview Assigned To => AugustoMauch
2015-03-18 15:09alostaleRelationship addedrelated to 0029270
2017-03-31 14:36alostaleStatusscheduled => acknowledged
2017-04-10 14:33alostaleAssigned Toalostale => platform
2022-02-01 08:09alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.