Hi
I was investigating the logs emitted when using
demoDB_3.0_with_administrator.zip
This emits a lot of warnings because the SQL statements for creating the
database are not correct.
Therefore I would like to make the DbUpgrade more strict by:
* Logging all SQL statement executed (as DEBUG_MSG) (we already trace all
select in Query)
* Stop the upgrade when a SQL statement cannot be executed
* Exit Elexis when the upgrade is not successfull
The two last points I would skip if the vmarg -
Dch.elexis.dbupdate.ignore_errors is set to true
I am also tempted to add the in ch.rgw.tools.JdbcLink the methods
* startTransaction
* rollbackTransaction
* commitTransaction
via Jdbc.setAutocommit(false) see
https://www.tutorialspoint.com/jdbc/jdbc-transactions.htm
In a second step I would use a transaction for the whole dbupgrade for
PostGreSQL databases, as MySQL and H2 always commit a transaction when a alter
db schema command is issued.
Any suggestions/remarks?
Best regards
Niklaus
--
Niklaus Giger
Wieshoschet 6
CH-8753 Mollis
+41 (0)55 612 20 54 P
+41 (0)77 454 01 61 Mobil
|