CDriver
(CDriver)
January 1, 2021, 11:43pm
1
As part of the upgrade and persistence migration from old mysql to jdbc, you have to change the config to ensure it keeps your item mappings.
However, even if you use the recommended config
tableNamePrefix=Item
tableUseRealItemNames=false
tableIdDigitCount=0
it uses an index table called items and not Items. As a result, everything is out of whack.
I assume this is not by-design?
To fix, you simply have to run the following in mysql query
truncate table items
insert INTO items
SELECT * FROM Items
only to be run if your DB is case sensitive
Anyone else seen this happen?
To be sure, open an issue on GitHub.
CDriver
(CDriver)
January 1, 2021, 11:52pm
3
yup, just added on there too.
1 Like
cweitkamp
(Christoph Weitkamp)
January 2, 2021, 9:32am
4
Thanks for creating the error report in GitHub. There are other people around discovery the same issue (see JDBC Mysql persistence in OH3 - #24 by cweitkamp ).
CDriver
(CDriver)
January 2, 2021, 10:09am
5
Ah yes, so there are.
no problem in crating the bug. Thanks for the effort put in to the application!
1 Like
laursen
(Jacob Laursen)
January 2, 2021, 12:38pm
6
Hi,
This happened for me also last night after upgrading, it took me more than an hour to clean up the mess after mixing data between old numbering and new numbering for items having the same value type.
Best regards,
Jacob Laursen