Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036933 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
backport | [Openbravo ERP] Y. DBSourceManager | major | always | 2017-09-20 18:57 | 2017-09-25 12:45 | |||
Reporter | malsasua | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | 3.0PR17Q2.4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | f7d032aa5982 | ||||
Projection | none | ETA | none | Target Version | 3.0PR17Q2.4 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | alostale | |||||||
OBNetwork customer | No | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | Production - Confirmed Stable | |||||||
Regression date | 2017-01-11 | |||||||
Regression introduced in release | 3.0PR17Q2 | |||||||
Regression introduced by commit | http://code.openbravo.com/erp/devel/pi/rev/47c768943f70d1c674cb0a2701faf29edde3da84 [^] | |||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036933: It is not possible to change the size of columns if the column is used in a view | |||||||
Description | when a column is used in a view, and the column size is changed, the update.database process returns one error: [java] 113277 WARN - SQL Command failed with: ERROR: cannot alter type of a column used by a view or rule [java] Detail: rule _RETURN on view c_invoice_v2 depends on column "poreference" [java] 113285 WARN - -- END [java] ALTER TABLE C_INVOICE ALTER COLUMN POREFERENCE TYPE VARCHAR(255) | |||||||
Steps To Reproduce | . in xml file (src-db/database/model/tables/C_INVOICE.xml), change the size of column "POREFERENCE" to 255 in c_invoice table . execute: ant update.database | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
||||||||
|
![]() |
|
(0099518) hgbot (developer) 2017-09-25 10:57 |
Repository: erp/backports/3.0PR17Q2.4 Changeset: f7d032aa59828520dbd057236261c0bf65eeb8fd Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Mon Sep 25 10:24:56 2017 +0200 URL: http://code.openbravo.com/erp/backports/3.0PR17Q2.4/rev/f7d032aa59828520dbd057236261c0bf65eeb8fd [^] Fixes bug 36933:Updating the column length on table referenced by a view works There was a problem when a the column length of a table (T) referenced by a view (V) was updated, if that view was referenced by another view (V2). In the step to update the model, the following steps were done in single batch: - The views are dropped (forced = true) - The model is updated (forced = false) - The views are recreated What happened is that the view V1 could not be dropped because V2 referenced it (and drop on cascade was not used). Then the batch failed, and only those commands with forced=true were recreated, so the model was not updated. To fix this, now the views are dropped in a different batch than the one used to update the model. There is an API change, since before this change this step was enough to do the whole update of the model: getSqlBuilder().alterDatabase(currentModel, desiredModel, params); And now this it is required to call and evalue the following command: getSqlBuilder().prepareDatabaseForAlter(currentModel, desiredModel, params, changes); This has been changed in all Openbravo occurrences, and no occurrences outside Openbravo have been found. --- M src-db/database/lib/dbsourcemanager.jar --- |
(0099534) alostale (viewer) 2017-09-25 12:45 |
reviewed + tested |
![]() |
|||
Date Modified | Username | Field | Change |
2017-09-25 09:41 | AugustoMauch | Type | defect => backport |
2017-09-25 09:41 | AugustoMauch | Target Version | => 3.0PR17Q4.1 |
2017-09-25 10:41 | AugustoMauch | Target Version | 3.0PR17Q4.1 => 3.0PR17Q2.4 |
2017-09-25 10:57 | hgbot | Checkin | |
2017-09-25 10:57 | hgbot | Note Added: 0099518 | |
2017-09-25 10:57 | hgbot | Status | scheduled => resolved |
2017-09-25 10:57 | hgbot | Resolution | open => fixed |
2017-09-25 10:57 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/dbsm-main/rev/7cdd957ca8790f1c9bb971e66c40b9f38a842b7d [^] => http://code.openbravo.com/erp/backports/3.0PR17Q2.4/rev/f7d032aa59828520dbd057236261c0bf65eeb8fd [^] |
2017-09-25 12:45 | alostale | Note Added: 0099534 | |
2017-09-25 12:45 | alostale | Status | resolved => closed |
2017-09-25 12:45 | alostale | Fixed in Version | => 3.0PR17Q2.4 |
Copyright © 2000 - 2009 MantisBT Group |