Skip to content

Commit

Permalink
Merge pull request #228 from ValtsS/backport
Browse files Browse the repository at this point in the history
Delete before insert inside same version
  • Loading branch information
mganss authored May 2, 2024
2 parents 5e47361 + fa0ab4e commit 2c07dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SyncChanges/Synchronizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ private ChangeInfo RetrieveChanges(DatabaseInfo source, IGrouping<long, Database
from CHANGETABLE (CHANGES {tableName}, @0) c
left outer join {tableName} t on ";
sql += string.Join(" and ", table.KeyColumns.Select(k => $"c.{k} = t.{k}"));
sql += " order by coalesce(c.SYS_CHANGE_CREATION_VERSION, c.SYS_CHANGE_VERSION)";
sql += " order by coalesce(c.SYS_CHANGE_CREATION_VERSION, c.SYS_CHANGE_VERSION), c.SYS_CHANGE_OPERATION";

Log.Debug($"Retrieving changes for table {tableName}: {sql}");

Expand Down

0 comments on commit 2c07dc8

Please sign in to comment.