Thoughts for refactoring my old OH setup: item names and historic persistance values

As I’m about to prepare the move to OH3, I’d also like to do some refactoring, regarding my years-old item-names, rules, and then some.

I like to change my item names, as they grew over time and I like to have them be more structured, so I can see through the concept just by the item names, which are not streamlined atm.
I also don’t like to lose my old persisted data values, but I’m afraid, if I move from the “old” MySQL-persistance to a new one, I’ll lose historic data, which I like to have access to (e.g. historic consumption data or some data I’d like to detract action from like heating information or the like).

So, is there a possibility to move historic data from one item to another - or do I have to setup the new items and write a script for the database to migrate the data on db-level?

I didn’t try, but I just found this:

Lisa’s suggestion:


INSERT INTO NewTable SELECT * from OldTable;

e.g. INSERT INTO Item3857 SELECT * FROM Item3854;

You can drop the old table too:

DROP OldTable;


She has got a script ono her site check against an itemlist, but I didn’t find out how to get active Items from openhab automatically