Synchronization malfunction after eWay-CRM update - "Cannot create column OwnerGUID for the table Relations"

Description

After you finish the update of eWay-CRM, the synchronization is not working. If you look at the log, you will see this error:

Synchronization failed
eWay.Core.DataInterface.StoreException: Cannot create column OwnerGUID for the table Relations ---> eWay.Core.DataInterface.StoreException: Cannot execute sql ALTER TABLE Relations ALTER COLUMN [OwnerGUID] UNIQUEIDENTIFIER NOT NULL;. ---> System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'OwnerGUID', table 'eway_msimecek.dbo.Relations'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
   v System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   v System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   v System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
   v System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   v System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
   v System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
   v System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   v eWay.Core.Data.SynchronizedSqlCommand.<>c__DisplayClass6.<ExecuteNonQuery>b__4()
   v eWay.Core.Data.SqlCommandRepeater.RunSqlCommand(SqlCommand command, SqlCommandDelegate sqlCommand)
   v eWay.Core.Data.SynchronizedSqlCommand.ExecuteNonQuery()
   v eWay.Core.MSSQLDataInterface.MSSQLItemStore.ExecuteRawSql(SqlConnection connection, String sql, Int32 timeOut)
   --- Konec trasování zásobníku pro vnitřní výjimku ---
   v eWay.Core.MSSQLDataInterface.MSSQLItemStore.ExecuteRawSql(SqlConnection connection, String sql, Int32 timeOut)
   v eWay.Core.MSSQLDataInterface.MSSQLItemStore.AlterColumn(String tableName, DatabaseColumn column, Boolean forceNullable)
   v eWay.Core.MSSQLDataInterface.MSSQLItemStore.CreateColumns(String tableId, DatabaseColumn[] databaseColumns)
   --- Konec trasování zásobníku pro vnitřní výjimku ---
   v eWay.Core.MSSQLDataInterface.MSSQLItemStore.CreateColumns(String tableId, DatabaseColumn[] databaseColumns)
   v eWay.Core.CachedDataInterface.CachedItemStore.SynchronizeTableColumns(String folder)
   v eWay.StandardEdition.Synchronization.SynchronizeThread.CreateDatabaseStructure()
--- END TRACE ---

Version

All versions of eWay-CRM

Difficulty

Medium

Resolution

The error is caused by missing values in the OwnerGUID column at relations (older version enables it).

eWay-CRM has a fix for the issue that uses values from the CreatedByGUID column of RelationData for the OwnerGUID column.

For the downloading the fix, click the link: http://download.eway-crm.cz/fix/FixRelationsOwnerGUID.zip

You need to unzip the file and then launch FixLocalDatabase.exe.