Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034102Openbravo ERPY. DBSourceManagerpublic2016-09-27 16:472017-10-09 12:04
caristu 
platform 
normalminoralways
closedfixed 
5
 
 
caristu
Core
No
0034102: Update.database and Install.Source tasks should use the same flow to create the database and the db model
Update.database and Install.Source tasks should use the same flow to create the database and the db model. Currently there is duplicated code that is handling those tasks separately. This causes that the behavior is different when applying some model changes.

For example, currently DB Source Manager supports the exportation of the following changes into a Configuration Script[1]:

- Remove Trigger
- Column Required
- Column Size
- Column Data

But on install.source task it is only possible to apply these changes: Column Size, Column Data and Remove Check. See[2].

The Remove Check change is supported on install.source since the resolution of issue 0036137, but still it is being handled in a different flow from the update.database task.

[1] http://wiki.openbravo.com/wiki/ERP_2.50:Developers_Guide/How_To_Create_a_Configuration_Script [^]

[2] https://code.openbravo.com/erp/devel/dbsm-main/file/482384f24ab9/src/org/apache/ddlutils/platform/SqlBuilder.java#l4504 [^]
1) Create a new Template and place the attached configuration script into the src-db/database folder. Notice that the config script is intended to turn into false the required property of the C_CURRENCY_ID column in the A_AMORTIZATION_TABLE
2) Run install.source. Notice that the C_CURRENCY_ID is still mandatory --> check the database: the change has NOT been applied
3) Run ant update.database. Notice that the C_CURRENCY_ID is not mandatory --> check the database: the change has been applied
No tags attached.
related to defect 00334173.0PR17Q1 closed caristu Loading config script for a module template in install.source task fails in pgsql 9.3 
related to defect 0036137 closed inigosanchez [SER-QA 2918] Config script removeCheckChange are not applied on install.source 
related to defect 0034131 closed alostale can't export database in verbose mode if there's a config script changing a column to nullable 
xml configScript.xml (188) 2016-09-27 16:47
https://issues.openbravo.com/file_download.php?file_id=9862&type=bug
Issue History
2016-09-27 16:47caristuNew Issue
2016-09-27 16:47caristuAssigned To => platform
2016-09-27 16:47caristuModules => Core
2016-09-27 16:47caristuTriggers an Emergency Pack => No
2016-09-27 16:47caristuFile Added: configScript.xml
2016-09-27 16:49caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13251#r13251
2016-09-27 16:49caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=13252#r13252
2016-09-27 16:50caristuRelationship addedrelated to 0033417
2016-09-29 09:27alostaleStatusnew => acknowledged
2016-09-29 16:21caristuCategoryA. Platform => Y. DBSourceManager
2016-09-30 09:28alostaleRelationship addedrelated to 0034131
2016-12-01 13:20alostalePriorityhigh => normal
2017-06-06 17:43inigosanchezRelationship addedrelated to 0036137
2017-06-08 13:19caristuTypedefect => design defect
2017-06-08 13:19caristuSummarySome config script changes are not applied during install.source => Update.database and Install.Source tasks should use the same flow to create the database and the db model
2017-06-08 13:19caristuDescription Updatedbug_revision_view_page.php?rev_id=15312#r15312
2017-06-08 20:48inigosanchezNote Added: 0097257
2017-06-08 20:48inigosanchezDescription Updatedbug_revision_view_page.php?rev_id=15313#r15313
2017-10-09 12:04caristuStatusacknowledged => scheduled
2017-10-09 12:04caristuReview Assigned To => caristu
2017-10-09 12:04caristuNote Added: 0099824
2017-10-09 12:04caristuStatusscheduled => closed
2017-10-09 12:04caristuResolutionopen => fixed

Notes
(0097257)
inigosanchez   
2017-06-08 20:48   
Remove check is now supported on the install.source task. See issue 0036137
(0099824)
caristu   
2017-10-09 12:04   
fixed by 0036137