Migrating from Postgres to Microsoft SQL. Historian Tags not working

I have encounterd a problem when we had to change database type from Postgres to Microsoft SQL.
There was alot of changes that was needed with named queries formatting and gateway settings in general, but all these problems resolved after some tweeking and I am able to put in and read data from new database from the Ignition software which indicates that it is a communication. The problem that I still cant figure out is regarding the standard Historian tags.

I have updated every single historian Tag to match the new storage provider.
I have deleted the old database and renamed the new one the same as the old one, as this was recommended in another forum post.
I have made sure that the “Store and Forward Engine” is available and running.

Ignition was able to automatically insert the tables (sqlt_data_0_2019_11, etc…) where the data is supposed to go, but no data is being inserted automatically. I am left with two errors in the logs regarding this.

  1. Error forwarding data:
    java.lang.NullPointerException: null
    at com.inductiveautomation.gateway.tags.history.storage.TagHistoryDatasourceSink.insertTagValues(TagHistoryDatasourceSink.java:926)

  2. Error modifying tag information in the database.
    com.microsoft.sqlserver.jdbc.SQLServerException: Arithmetic overflow error converting expression to data type int.

Just let me know if some more information is needed.
Any tips would be greatly appreciated. Thanks!

Manage to solve this issue by deleting all Ignition genereted tables and then set up the whole database settings all over again. Then the “sqlth_te” table was automatically recreated with all of its tags with the right tag id. This then resolved the issue as the pointer didn’t know where to point.