Sometimes, we have to change the tag folder name after a long time and we have a lot of history.
Unfortunately, this act causes the new tag Id is created in the "sqlth_te" table and the old name to be marked as retired so we lost our data.
I believe this action is only correct if the user deletes the tags, but when he changes the tag name the only thing that should be updated is the tagPath in the "sqlth_te" table and not flag it as retired.
So I wonder if other people suffer from this problem and if is there any workaround for this.
Lots of people suffer from this. It has been this way from the beginning. The DB structure is public, so those who care update the DB themselves. Not exactly trivial, but not rocket science.
Users also suffer when a tag is moved to a different folder. Not as simple a fix.
Disable them all.
Use a SQL workbench to run something like
Update sqlth_te
Set tagpath = concat('[provider]new/station/prefix/', right(tagpath, len(tagpath) - ..len of old prefix..))
Where tagpath like '[provider]old/station/prefix/%'
It's not worked, replace the old tagpath with new tagpath. Enabled the tag and it's logged on interval basis.I tried so many times, but every time the new id created in sqlte table.
update for_test.sqlth_te
set tagpath = "name test tagss/ramp4"
where tagpath = "name test tags/ramp4"
id no.1 to 4 old tagpath name name test tags/ramp0 replaced by new tagpath name test tagss/ramp0. All ID tag paths have been renamed. When the tag is enabled and data logging started, a new ID is generated as ID number 5 to 8 and data logged with this new id number.