purgeSynced method
Delete synced entries older than retention.
Implementation
@override
Future<void> purgeSynced(
{Duration retention = const Duration(days: 30)}) async {
final cutoff =
DateTime.now().toUtc().subtract(retention).millisecondsSinceEpoch;
await _db.customStatement(
'DELETE FROM dynos_sync_queue WHERE synced_at IS NOT NULL AND synced_at < ?',
[cutoff],
);
}