Skip to content
Discussion options

You must be logged in to vote

You want to keep the rows for all tables that are upload only right, when making a reinit ?

Once thing you can test (I didn't test, but it's worth a try) is to intercept the command when a reset is occurring.
The idea is to replace the CommandText property with something that will work but will not delete all the rows:

agent.LocalOrchestrator.OnGetCommand(args =>
{
  if (args.CommandType == DbCommandType.Reset)
  {
      var setupTable = args.ScopeInfo.Setup.Tables[args.Table.TableName, args.Table.SchemaName];

      if (setupTable != null && setupTable.SyncDirection == SyncDirection.UploadOnly)
          args.Command.CommandText = "Select 1;";
  }
});

All the rows from UploadOnly tables,…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Daxter98
Comment options

Daxter98 Dec 20, 2024
Author Sponsor

@Mimetis
Comment options

@Daxter98
Comment options

Daxter98 Dec 21, 2024
Author Sponsor

Answer selected by Daxter98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants