Wed, 01 Jul 2015 16:21:28 +0200DBSourceManager supports function based indexes
Augusto Mauch <augusto.mauch@openbravo.com> [Wed, 01 Jul 2015 16:21:28 +0200] rev 612
DBSourceManager supports function based indexes

This changes adds support for function based indexes. Some limitations apply:
- The functions used should accept only one input parameter (i.e. SUBSTRING is not supported, as it needs two)
- The use of user defined functions is not supported. Functions used in indexes must be deterministic, and as of this moment DBSourcemanger does not support this.
- Only one function can be used per index

The name function used in the index will be stored in the functionName attribute of the index-column:

<index name="C_BPARTNER_UPPER_NAME" unique="false">
<index-column name="NAME" functionName="UPPER"/>
</index>

The SQL command built to create the query will wrap the function name around the index column name, like this:

CREATE INDEX C_BPARTNER_UPPER_NAME ON C_BPARTNER (UPPER(NAME))

The OracleModelLoader and PostgreSQLModelLoader classes have been updated to retrieve the information needed for creating function based indexes in Oracle and PostgreSQL respectively. The SqlBuilder class has been updated to take into account the function applied to index columns when creating the SQL commands. The IndexColumn class and the mapping.xml file have been updated to take into account the index columns can have a new properly named functionName.

Wed, 22 Jul 2015 09:33:37 +0200related to bug 30397: DB inconsistencies in PG9.5
Asier Lostalé <asier.lostale@openbravo.com> [Wed, 22 Jul 2015 09:33:37 +0200] rev 611
related to bug 30397: DB inconsistencies in PG9.5

Added test cases covering PostgreSQL standardization inconsistencies

Wed, 22 Jul 2015 09:32:02 +0200related to bug 30397, related to bug 28684: DB inconsistencies in PG9.5
Asier Lostalé <asier.lostale@openbravo.com> [Wed, 22 Jul 2015 09:32:02 +0200] rev 610
related to bug 30397, related to bug 28684: DB inconsistencies in PG9.5

Ignoring test cases created for issue #28684 because they do not apply anymore.

Now code for checks are read differently so the modifications previously tested
don't apply anymore.

Wed, 22 Jul 2015 09:15:58 +0200related to bug 30397: DB inconsistencies in PG9.5
Asier Lostalé <asier.lostale@openbravo.com> [Wed, 22 Jul 2015 09:15:58 +0200] rev 609
related to bug 30397: DB inconsistencies in PG9.5

Fixed brackets in views for some GROUP BY fields.

Starting from PostgreSQL 9.5, some fields in GROUP BY are enclosed between
brackets. These brackets are removed to keep the same formatting as in previous
versions.

Example of a modification before this changeset:

- <view name="FIN_DOUBTFUL_DEBT_V"><![CDATA[SELECT ... GROUP BY ... trunc(now()) - trunc(ps.duedate) ... ]]></view>
+ <view name="FIN_DOUBTFUL_DEBT_V"><![CDATA[SELECT ... GROUP BY ... (trunc(now()) - trunc(ps.duedate)) ... ]]></view>

Wed, 22 Jul 2015 09:12:56 +0200related to bug 30397: DB inconsistencies in PG9.5
Asier Lostalé <asier.lostale@openbravo.com> [Wed, 22 Jul 2015 09:12:56 +0200] rev 608
related to bug 30397: DB inconsistencies in PG9.5

Fixed changes of numeric constants in views.

When the view contains a numeric constant, in previous versions the query was
internally translated to:

... WHEN sd.m_locator_id IS NULL THEN (-1)::numeric * ol.qtyordered ...

and in 9.5 is:
... WHEN sd.m_locator_id IS NULL THEN '-1'::integer::numeric * ol.qtyordered ...

This case has been taken into account in PostgreSQLStandarization to standarize
in both cases to the same SQL.

Wed, 22 Jul 2015 09:08:59 +0200related to bug 30397: DB inconsistencies in PG9.5
Asier Lostalé <asier.lostale@openbravo.com> [Wed, 22 Jul 2015 09:08:59 +0200] rev 607
related to bug 30397: DB inconsistencies in PG9.5

Fixed changes in check constraints.

OR expressions were grouped differently in pg9.5 than in previous versions.

Fixed by getting check constraint definition with pg_get_constraintdef instead
of directly from pg_constraint.consrc. After this change, some of the modifications
performed in PostgreSqlCheckTranslation are no longer required.

Thu, 30 Jul 2015 10:59:34 +0200Related to issue 30459: Not send versions on install.source in DBSourceManager
Carlos Aristu <carlos.aristu@openbravo.com> [Thu, 30 Jul 2015 10:59:34 +0200] rev 606
Related to issue 30459: Not send versions on install.source in DBSourceManager

Mon, 04 May 2015 15:33:01 +0200related to issue 28849: added test case
Asier Lostalé <asier.lostale@openbravo.com> [Mon, 04 May 2015 15:33:01 +0200] rev 605
related to issue 28849: added test case

Wed, 04 Feb 2015 15:13:45 +0100fixed bug 28849: export.database fails with new postgresql jdbc versions
Asier Lostalé <asier.lostale@openbravo.com> [Wed, 04 Feb 2015 15:13:45 +0100] rev 604
fixed bug 28849: export.database fails with new postgresql jdbc versions

NPE was trhown when trying to do a preparedStatemet.getString(pos) because
toString is not implemented for binary types.

Tue, 21 Jul 2015 08:46:53 +0200Fixes issue 30286: Adapt DBSourceManager to get versions in ModuleScriptHandler
Carlos Aristu <carlos.aristu@openbravo.com> [Tue, 21 Jul 2015 08:46:53 +0200] rev 603
Fixes issue 30286: Adapt DBSourceManager to get versions in ModuleScriptHandler