mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 13:08:42 +00:00
make backups smaller
This commit is contained in:
parent
1e14905682
commit
570d820ada
1 changed files with 34 additions and 20 deletions
|
|
@ -105,25 +105,39 @@ class TwonlyDB extends _$TwonlyDB {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> deleteDataForTwonlySafe() async {
|
Future<void> deleteDataForTwonlySafe() async {
|
||||||
// await delete(messages).go();
|
await (delete(messages)
|
||||||
// await delete(messageRetransmissions).go();
|
..where(
|
||||||
// await delete(mediaUploads).go();
|
(t) => (t.mediaStored.equals(false) &
|
||||||
// await update(contacts).write(
|
t.isDeletedFromSender.equals(false)),
|
||||||
// const ContactsCompanion(
|
))
|
||||||
// avatarSvg: Value(null),
|
.go();
|
||||||
// myAvatarCounter: Value(0),
|
await update(messages).write(
|
||||||
// ),
|
const MessagesCompanion(
|
||||||
// );
|
downloadToken: Value(null),
|
||||||
// await delete(signalContactPreKeys).go();
|
),
|
||||||
// await delete(signalContactSignedPreKeys).go();
|
);
|
||||||
// await (delete(signalPreKeyStores)
|
await (delete(mediaFiles)
|
||||||
// ..where(
|
..where(
|
||||||
// (t) => (t.createdAt.isSmallerThanValue(
|
(t) => (t.stored.equals(false)),
|
||||||
// DateTime.now().subtract(
|
))
|
||||||
// const Duration(days: 25),
|
.go();
|
||||||
// ),
|
await delete(receipts).go();
|
||||||
// )),
|
await update(contacts).write(
|
||||||
// ))
|
const ContactsCompanion(
|
||||||
// .go();
|
avatarSvgCompressed: Value(null),
|
||||||
|
senderProfileCounter: Value(0),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
await delete(signalContactPreKeys).go();
|
||||||
|
await delete(signalContactSignedPreKeys).go();
|
||||||
|
await (delete(signalPreKeyStores)
|
||||||
|
..where(
|
||||||
|
(t) => (t.createdAt.isSmallerThanValue(
|
||||||
|
DateTime.now().subtract(
|
||||||
|
const Duration(days: 25),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
))
|
||||||
|
.go();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue