[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>
This commit is contained in:
Jacob Laursen
2022-11-27 19:02:43 +01:00
committed by GitHub
parent 583da2d516
commit 22ea587d20
8 changed files with 309 additions and 5 deletions

View File

@@ -208,6 +208,12 @@ Manual changes in the index table, `Items`, will not be picked up automatically
The same is true when manually adding new item tables or deleting existing ones.
After making such changes, the command `jdbc reload` can be used to reload the index.
#### Check/fix Schema
Use the command `jdbc schema check` to perform an integrity check of the schema.
Identified issues can be fixed automatically using the command `jdbc schema fix` (all items having issues) or `jdbc schema fix <itemName>` (single item).
### For Developers
* Clearly separated source files for the database-specific part of openHAB logic.