I am repetitively receiving the following error after upgrading:
=====================
[2018-07-05 2:39:02 AM]
Auto Purge Deleted Thread error detected
The DELETE statement conflicted with the REFERENCE constraint "FK_st_TicketLinks_st_Tickets2". The conflict occurred in database "DB_3912_supportmycou", table "dbo.st_TicketLinks", column 'TicketID_Secondary'.
The statement has been terminated.
System.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK_st_TicketLinks_st_Tickets2". The conflict occurred in database "DB_3912_supportmycou", table "dbo.st_TicketLinks", column 'TicketID_Secondary'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at SmarterTrack.Data.SqlHelperInternal.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at SmarterTrack.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters)
at SmarterTrack.Data.DataLayerShortcut.ExecuteNonQuery(IDbConnection& conn, String query, SqlParameter[] parameters)
at SmarterTrack.Data.TicketEntity.PurgeFromDatabase(IDbConnection& connection, List`1 ticketIDs)
at SmarterTrack.HelperClasses.Threads.AutoPurgeDeletedThread.#0zc()
at SmarterTrack.HelperClasses.Threads.AutoPurgeDeletedThread.#Zzc()
at SmarterTrack.HelperClasses.Threads.AutoPurgeDeletedThread.DoWork()
ClientConnectionId:4733f7ac-7ca2-4b17-a09a-9967952bb766
Error Number:547,State:0,Class:16
Why is this occurring?