Skip to content

Conversation

shenlong-tanwen
Copy link
Member

How was this tested

  • The logout flow is updated to use the same method. I've verified that all the remote entities are cleared on logout

@zackpollard
Copy link
Member

The only thing I would say here is that in this case it would be ideal to immediately queue a new sync after this one completes, not sure what the semantics of that would look like though.

@shenlong-tanwen
Copy link
Member Author

The only thing I would say here is that in this case it would be ideal to immediately queue a new sync after this one completes, not sure what the semantics of that would look like though.

I can think of few ways to do this but none of them are as elegant as having something like the Job queue on the server ':)

// https://www.sqlite.org/pragma.html#pragma_foreign_keys
await _db.customStatement('PRAGMA foreign_keys = OFF');
await transaction(() async {
await _db.assetFaceEntity.deleteAll();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the correct call for the table's order?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deletes won't fail as we disable the foreign key constraints before calling the delete method on the entities

@alextran1502 alextran1502 merged commit fd4c2ac into main Sep 8, 2025
48 checks passed
@alextran1502 alextran1502 deleted the feat/handle-syncresetv1 branch September 8, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants