How to fix Failed to check for changes in table 'TableName' due to exception: Microsoft.Data.SqlClient.SqlException
We have enabled Change tracking on a table (say Table_A) and built Azure SQL Trigger function to track changes.
Few days later, we have added a new column (say Column_A) to the Table_A and re-deployed the Azure SQL Trigger function app.
This working for while with no issues for few days. After few days later, we receiving the below error
Failed to check for changes in table 'dbo.Table_A' due to exception: Microsoft.Data.SqlClient.SqlException. Exception message: Invalid column name 'Column_A'
To resolve this, we had to Disable change tracking, Drop GlobalState and Lease Table created in az_func schema, enable change tracking on the table and deploy the azure SQL Trigger function app.
Please help to identify what is causing the issue in the first place.
Thanks for help in advance.