# Migrate tag history when Tag location has changed

**URL:** <https://forum.inductiveautomation.com/t/migrate-tag-history-when-tag-location-has-changed/80732>\
**Category:** Ignition\
**Tags:** database, ignition81\
**Created:** [October 19, 2023, 10:31pm UTC](https://forum.inductiveautomation.com/t/migrate-tag-history-when-tag-location-has-changed/80732 "2023-10-19T22:31:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![crogar24](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@crogar24](https://forum.inductiveautomation.com/u/crogar24)\
**Post date:** [October 19, 2023, 10:31pm UTC](https://forum.inductiveautomation.com/t/migrate-tag-history-when-tag-location-has-changed/80732/1 "2023-10-19T22:31:16Z")

</div>

Hi,  
I've been trying to maintain historical data in a continuous format but I ran into an issue when I had to change the location of my tag in the my tag data provider. The previous data won't be displayed in the trends or when trying to use a binding to access that data.  
Does Ignition have a way to keep track of the tag location and automatically store the data using the same tag id. If I decided to make some changes to those tags offline(modify the json data) and re-import after the processing. Sometimes these tags get re-imported with a different tag id.  
I'm just wondering what are the best practices to ensure I can keep my table clean, well structured and concise when I have tags with tag historian enabled.  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [October 20, 2023, 6:17am UTC](https://forum.inductiveautomation.com/t/migrate-tag-history-when-tag-location-has-changed/80732/2 "2023-10-20T06:17:15Z")

</div>

[https://docs.inductiveautomation.com/display/DOC81/Ignition+Database+Table+Reference](https://docs.inductiveautomation.com/display/DOC81/Ignition+Database+Table+Reference)  
This is reference of the ignition dataabse, tag details and corresponding `tagid` value are stored in the `sqlth_te` table.

You could write your new tag path next to the correct tagid to adjust this. But modifying your database is dangerous, so make sure to have a full backup before changing anything.

---

<div class="post-metadata">

**Author:** ![crogar24](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@crogar24](https://forum.inductiveautomation.com/u/crogar24)\
**Post date:** [October 20, 2023, 9:24pm UTC](https://forum.inductiveautomation.com/t/migrate-tag-history-when-tag-location-has-changed/80732/3 "2023-10-20T21:24:25Z")

</div>

This is a great reference! I tried to find something similar and couldnt find it anywhere.  
Thank you so much!
