Commit Graph

75 Commits

Author SHA1 Message Date
Robert D
99e78d84b5
fix timescale db type replacement (#15156)
Signed-off-by: querdenker2k <querdenker2k@gmx.de>
2023-07-02 21:20:50 +02:00
J-N-K
d85bb786ad
[jdbc] Fix addon-info (#14987)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-13 20:55:31 +02:00
J-N-K
c3a9a4c7b6
Adjust to core changes (#14952)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-08 09:35:36 +02:00
Jacob Laursen
d7b94b6bd3
Upgrade MySQL Connector/J to 8.0.33 (#14874)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-04-25 07:45:00 +02:00
Ilias Ktn
a42b92b183
Working PostgreSQL Schema check/fix and set TIMESTAMPTZ to match MySQL defaults (#14294)
Signed-off-by: Ilias Kotinas <henfiber@gmail.com>
2023-02-02 08:27:16 +01:00
Ilias Ktn
29b17e9c75
Perform upsert on key conflict like the default for MySQL (PostgreSQL >= 9.5) (#14281)
Signed-off-by: Ilias Kotinas <henfiber@gmail.com>
2023-01-27 10:33:11 +01:00
J-N-K
5f8214f08a
Adapt to core changes (addon.xml) (#13289)
Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-01-15 20:31:42 +01:00
Jacob Laursen
4dd6d3a8a2
Update license headers to 2023 (#14154)
* Update copyright year in configuration
* Update license headers

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2023-01-06 09:49:54 +01:00
Jacob Laursen
0b59be62b6
Skip loading/migrating items with invalid name (#14054)
Fixes #14053

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-27 11:41:59 +01:00
Jacob Laursen
127f998a69
Upgrade MySQL Connector/J to 8.0.31 (#13991)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-19 23:49:51 +01:00
Kai Takac
36137992a5
[jdbc] Update org.xerial/sqlite-jdbc to 3.40.0.0 (#14003)
* [jdbc] Update org.xerial/sqlite-jdbc to 3.40.0.0

Co-authored-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Kai Takac <kai.takac@gmail.com>
2022-12-18 19:04:43 +01:00
Jacob Laursen
a3fccc6390
Fix console command 'tables clean' (#13916)
NullPointerException was thrown because index table was not provided

Fixes #13911

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-11 22:47:37 +01:00
Jacob Laursen
dd8b7c8b65
[jdbc] Fix date filter to be inclusive (Derby) (#13850)
Fixes #9906

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-05 17:09:13 +01:00
Jacob Laursen
a0ac57cfd9
Fix date filter to be inclusive (PostgreSQL) (#13843)
Fixes #9906

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-05 00:27:54 +01:00
Jacob Laursen
312b4e2faf
Fix console command 'tables' for SQLite (#13837)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-04 14:54:12 +01:00
Jacob Laursen
e979be4911
Fix Derby/H2/HSQLDB/SQLite queries for storing timestamps (#13817)
Fixes #13816

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-02 08:14:23 +01:00
dependabot[bot]
9cc3cd0cf9
[jdbc] Update PostgreSQL JDBC driver to 42.4.3 (#13770)
* Bump postgresql in /bundles/org.openhab.persistence.jdbc

Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.4.1 to 42.4.3.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.4.1...REL42.4.3)

---
updated-dependencies:
- dependency-name: org.postgresql:postgresql
  dependency-type: direct:production
...

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-12-01 22:32:55 +01:00
Jacob Laursen
3912487305
[jdbc] Add safety valve for suspicious migrations (#13797)
* Abort migration from real names when most tables have table name prefix
* Add missing checks for database connection from console commands
* Add additional documentation for check/fix schema

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-28 23:38:55 +01:00
Jacob Laursen
22ea587d20
[jdbc] Add console command for checking/repairing schema integrity (#13765)
* Add console command for checking schema integrity
* Remove unneeded logging
* Add console command for fixing schema integrity
* Provide documentation
* Try to add support for Derby and PostgreSQL
* Sort alphabetically by item name

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-27 19:02:43 +01:00
Jacob Laursen
f9aa20e488
[jdbc] Fix date filter to be inclusive (#13734)
Fixes #9906

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-22 07:13:45 +01:00
Jacob Laursen
d3348327a9
Fix PostgreSQL query for storing timestamps (#13745)
Fixes #13121

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-19 20:57:51 +01:00
Jacob Laursen
d075f141d7
Make itemsManageTable configurable (#13737)
Fixes #9637

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-18 17:34:10 +01:00
Jacob Laursen
dbf2358280
Do not modify index or create tables when uninitialized (#13728)
Fixes #13727

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-17 20:00:31 +01:00
Jacob Laursen
2f786b87b4
Add console command for reloading index/schema (#13733)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-17 19:52:54 +01:00
Jacob Laursen
3ef974df17
Fix NoSuchElementException when there are no tables (#13731)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-17 00:58:14 +01:00
Jacob Laursen
0873dd3ddf
[jdbc] Improve error handling safety (#13726)
* Wrap YankSQLException into checked exception for all Yank calls

* Move files into internal

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-16 09:28:46 +01:00
Jacob Laursen
7eb2c9fb81
[jdbc] Improve error handling (#13719)
* Enable wrapped exceptions being thrown by Yank

Fixes #13718

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Fix SAT warning about hashCode implementation

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-15 08:44:12 +01:00
Jacob Laursen
159054a99c
[jdbc] Add console maintenance commands (#13662)
* Add console command for listing tables
* Query row counts only when needed and while generating output
* Add cleanup command
* Add documentation

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-12 12:30:53 +01:00
openhab-bot
62899e0fa5
New translations jdbc.properties (German) (#13697) 2022-11-11 22:36:39 +01:00
Jacob Laursen
64791b386c
[jdbc] Upgrade MariaDB connector to 3.0.8 (#13659)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-09 23:01:15 +01:00
openhab-bot
a8f671960d
New translations jdbc.properties (German) (#13686) 2022-11-09 10:52:30 +01:00
openhab-bot
cdff5a06e7
New translations jdbc.properties (German) (#13678) 2022-11-08 11:07:37 +01:00
Jacob Laursen
2c30756fdd
[jdbc] Fix MySQL deprecation notice on startup (#13660)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-05 20:27:38 +01:00
Jacob Laursen
70abb5d1f6
[jdbc] Add support for case sensitive table names reflecting item names 1:1 (#13544)
* Do not append number when using real item names
* Extract getTableName to separate class
* Add initial test coverage
* Extract migration logic to separate class
* Support migration from real names back to numbered
* Simplify zero-padding
* Fix NullPointerException
* Fix MySQL compatibility when CLIENT_MULTI_STATEMENTS option is not set
* Add option for case sensitive table names
* Add real name with suffix mode for backwards compatibility
* Remove real name in lower case without suffix mode
* Map directly from item name to table name
* Fix ambiguous table name scenario
* Add additional testcase
* Add migration path for changed table prefix
* Drop items table when using direct mapping
* Add configuration note
* Fix table alignment
* Extend description as more migration paths are now supported
* Do not stop halfway through a migration
* For clarity, do not use abbreviation for operating system

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-11-05 10:41:31 +01:00
dependabot[bot]
97956d30e9
[jdbc] Upgrade derby from 10.12.1.1 to 10.14.2.0 (#13038)
* Use derby instead of derbyclient, fix bnd optional package imports
* Update versions add dynamic package import for custom JDBC drivers
* Prevent redundant null check warnings

Signed-off-by: Wouter Born <github@maindrain.net>
2022-10-11 21:54:19 +02:00
Jacob Laursen
12389f083d
Consolidate and optimize datetime conversions (#13483)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-10-04 08:59:59 +02:00
Jacob Laursen
c706ac8478
[jdbc] Fix warnings and apply null annotations (#13429)
* Fix warnings and apply null annotations

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-10-02 11:14:41 +02:00
Jacob Laursen
3e5dde0474
Fix ClassCastException for LocalDateTime (#13425)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-09-21 19:10:02 +02:00
Jacob Laursen
474be93710
Fix date cast exception (#13382)
After upgrading mysql-connector to 8.0.30 this exception was thrown: class java.time.LocalDateTime cannot be cast to class java.sql.Timestamp

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-09-12 18:16:25 +02:00
Jacob Laursen
dddf463e09
Upgrade MySQL connector to 8.0.30 (#13242)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-08-31 21:56:39 +02:00
dependabot[bot]
4bf7a4a51e
[jdbc] Update PostgreSQL JDBC driver to 42.4.1 (#13221)
Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 42.3.3 to 42.4.1.
- [Release notes](https://github.com/pgjdbc/pgjdbc/releases)
- [Changelog](https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/pgjdbc/pgjdbc/compare/REL42.3.3...REL42.4.1)

Also-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2022-08-10 10:34:08 +02:00
openhab-bot
598d88648c
New Crowdin updates (#12849)
* New translations boschshc.properties (German)
* New translations jinja.properties (German)
* New translations regex.properties (German)
* New translations jsonpath.properties (German)
* New translations xpath.properties (German)
* New translations dynamodb.properties (German)
* New translations jdbc.properties (German)
* New translations neeo.properties (German)
* New translations fsinternetradio.properties (German)
* New translations sonyaudio.properties (German)
* New translations systeminfo.properties (German)
* New translations wemo.properties (German)
* New translations googlestt.properties (German)
* New translations voicerss.properties (German)
* New translations porcupineks.properties (German)
* New translations watsonstt.properties (German)
* New translations voskstt.properties (German)
* New translations deutschebahn.properties (German)
* New translations dwdunwetter.properties (German)
* New translations shelly.properties (German)
* New translations googletts.properties (German)
* New translations http.properties (Italian)
* New translations evcc.properties (German)
* New translations imperihome.properties (Italian)
* New translations voicerss.properties (German)
* New translations dwdunwetter.properties (German)
2022-06-01 12:11:04 +02:00
Dan Cunningham
5712de5e63
[jdbc] Rework TimescaleDB code to actually work (#12525)
Fixes #12513

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2022-04-02 18:11:32 +02:00
Christoph Weitkamp
9e6b901d53
Fixed parameter ordering while storing values (#12467)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-03-13 12:13:00 +01:00
dependabot[bot]
f28ef254cf
[jdbc] Update PostgreSQL JDBC driver to 42.3.3 (#12442)
* Bumps [postgresql](https://github.com/pgjdbc/pgjdbc) from 9.4.1212 to 42.3.3.
* Update docs and feature
* Update README

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Wouter Born <github@maindrain.net>
2022-03-07 22:35:20 +01:00
Christoph Weitkamp
187937fbd1
Catch exception in case of connection to database failed during activation of servive (#12313)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-19 21:37:23 +01:00
Christoph Weitkamp
d707420ec5
[jdbc] Fixed ClassCastException for ColorItem / HSBType (#12225)
* Fixed ClassCastException for ColorItem / HSBType

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-02-06 15:45:03 +01:00
Christoph Weitkamp
67b701b6b4
[jdbc] Removed check if item exists to allow to truncate data for clean-ups (#12052)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-15 17:09:54 +01:00
Christoph Weitkamp
bb2e4c7c65
[jdbc] Implement 'ModifiablePersistenceService' interface (#11922)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2022-01-15 14:29:06 +01:00
Hilbrand Bouwkamp
da59cdd255
Update license headers to 2022 (#11973)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2022-01-06 18:14:47 +01:00