Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0044892 | Openbravo ERP | Y. DBSourceManager | public | 2020-08-26 10:28 | 2022-11-03 12:41 |
|
Reporter | caristu | |
Assigned To | alostale | |
Priority | high | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | PR23Q1 | |
Merge Request Status | |
Review Assigned To | |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0044892: On install.source config scripts are applied in two steps |
Description | On install.source config scripts are applied in two steps:
1. creates the DB without applying scripts [1]
2. applies the config scripts
This two step process may be problematic, in particular in Oracle if the config script is making changes in columns that participate in functional indexes. In that case Oracle does not allow to change the column (in step 2) as reported in issue 0044612.
[1] https://gitlab.com/openbravo/projects/platform/dbsm/-/blob/master/src/org/openbravo/ddlutils/task/CreateDatabase.java#L124 [^] |
Steps To Reproduce | 1- Modify on a template a column that is used in functional index. For example the column name of C_BPartner:
<columnSizeChange tablename="C_BPARTNER" columnname="NAME" newSize="120" oldSize="60"/>
2- run ant install.source
ERROR: ORA-30556 |
Proposed Solution | 1) Review if there is any reason why we are doing this in two steps (historical reasons?)
2) Read the whole model at once including the config scripts and create the database with all the information in a shot |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0044612 | | closed | Triage Platform Base | ORA fails applying changes to columns used in functional indexes | related to | feature request | 0044896 | | new | Triage Platform Base | Add check for dangerous operations in update.database task | related to | defect | 0044901 | | closed | Triage Platform Base | PostgreSQL fails applying changes to columns used in views (during install.source) | related to | defect | 0045318 | | new | Triage Platform Base | NullPointerException during create.database with configScript doing model changes of non existing db objects | causes | defect | 0050729 | | closed | caristu | org.openbravo.reporting.tools fails to compile |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2020-08-26 10:28 | caristu | New Issue | |
2020-08-26 10:28 | caristu | Assigned To | => platform |
2020-08-26 10:28 | caristu | Modules | => Core |
2020-08-26 10:28 | caristu | Triggers an Emergency Pack | => No |
2020-08-26 10:28 | caristu | Relationship added | related to 0044612 |
2020-08-26 11:29 | caristu | Description Updated | bug_revision_view_page.php?rev_id=21545#r21545 |
2020-08-26 11:43 | caristu | Issue cloned | 0044896 |
2020-08-26 11:43 | caristu | Relationship added | related to 0044896 |
2020-08-26 14:41 | shuehner | Relationship added | related to 0044901 |
2020-10-29 13:48 | alostale | Relationship added | related to 0045318 |
2022-02-01 07:24 | alostale | Assigned To | platform => Triage Platform Base |
2022-10-27 09:40 | hgbot | Note Added: 0142631 | |
2022-10-28 08:27 | hgbot | Note Added: 0142700 | |
2022-11-02 07:36 | alostale | Assigned To | Triage Platform Base => alostale |
2022-11-02 07:37 | alostale | Status | new => scheduled |
2022-11-03 12:40 | hgbot | Resolution | open => fixed |
2022-11-03 12:40 | hgbot | Status | scheduled => closed |
2022-11-03 12:40 | hgbot | Note Added: 0142870 | |
2022-11-03 12:40 | hgbot | Note Added: 0142873 | |
2022-11-03 12:40 | hgbot | Note Added: 0142874 | |
2022-11-03 12:41 | hgbot | Note Added: 0142876 | |
2022-11-03 12:41 | hgbot | Fixed in Version | => PR23Q1 |
2022-11-03 12:41 | hgbot | Note Added: 0142877 | |
2022-11-04 09:22 | alostale | Relationship added | causes 0050729 |
Notes |
|
(0142631)
|
hgbot
|
2022-10-27 09:40
|
|
|
|
(0142700)
|
hgbot
|
2022-10-28 08:27
|
|
|
|
(0142870)
|
hgbot
|
2022-11-03 12:40
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/dbsm [^]
Changeset: 8a88bde77869ec36162052d118c4069980732813
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 03-11-2022 11:24:30
URL: https://gitlab.com/openbravo/product/dbsm/-/commit/8a88bde77869ec36162052d118c4069980732813 [^]
fixes ISSUE-44892: on DB creation config scripts are applied in two steps
When creating database, the database model was created in two steps:
1. model creation without taking into account config scripts
2. config script changes (model and data) were applied
This can cause different problems.
Now the process is more like:
1. read in memory model without config script changes
2. read config script model changes and apply them in memory model
3. create complete model in DB
4. read and apply data in DB without config script changes
5. read and apply in DB data config script changes
---
M src/org/openbravo/ddlutils/task/CreateDatabase.java
---
|
|
|
(0142873)
|
hgbot
|
2022-11-03 12:40
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/dbsm [^]
Changeset: 40ea1bfdbbe63ee46c2a360a6fd63f0d7bf00800
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 03-11-2022 12:34:31
URL: https://gitlab.com/openbravo/product/dbsm/-/commit/40ea1bfdbbe63ee46c2a360a6fd63f0d7bf00800 [^]
fixes ISSUE-44892: on DB creation config scripts are applied in two steps
When creating database, the database model was created in two steps:
1. model creation without taking into account config scripts
2. config script changes (model and data) were applied
This can cause different problems.
Now the process is more like:
1. read in memory model without config script changes
2. read config script model changes and apply them in memory model
3. create complete model in DB
4. read and apply data in DB without config script changes
5. read and apply in DB data config script changes
---
A src-test/model/configScripts/BASE_MODEL_FUNCT_IDX.xml
A src-test/model/configScripts/BASE_MODEL_VIEW.xml
A src/org/openbravo/ddlutils/process/DBCreator.java
M src-test/src/org/openbravo/dbsm/test/base/DbsmTest.java
M src-test/src/org/openbravo/dbsm/test/configscript/ConfigScriptColumnSizeChange.java
M src/org/openbravo/ddlutils/process/DBUpdater.java
M src/org/openbravo/ddlutils/task/AlterDatabaseDataAll.java
M src/org/openbravo/ddlutils/task/AlterXML2SQL.java
M src/org/openbravo/ddlutils/task/BaseDatabaseTask.java
M src/org/openbravo/ddlutils/task/CreateDatabase.java
M src/org/openbravo/ddlutils/task/DatabaseUtils.java
---
|
|
|
(0142874)
|
hgbot
|
2022-11-03 12:40
|
|
|
|
(0142876)
|
hgbot
|
2022-11-03 12:41
|
|
|
|
(0142877)
|
hgbot
|
2022-11-03 12:41
|
|
Directly closing issue as related merge request is already approved.
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 7707245518817c0416ef2fec0bad00d11c2afa56
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 03-11-2022 11:40:32
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/7707245518817c0416ef2fec0bad00d11c2afa56 [^]
fixes ISSUE-44892: on DB creation config scripts are applied in two steps
When creating database, the database model was created in two steps:
1. model creation without taking into account config scripts
2. config script changes (model and data) were applied
This can cause different problems.
Now the process is more like:
1. read in memory model without config script changes
2. read config script model changes and apply them in memory model
3. create complete model in DB
4. read and apply data in DB without config script changes
5. read and apply in DB data config script changes
---
M src-db/database/lib/dbsourcemanager.jar
---
|
|