do not write default values

This commit is contained in:
shenlong-tanwen
2026-05-12 02:30:28 +05:30
parent 3f6b3e1b99
commit 8c91a5a6c4
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -241,6 +241,9 @@ class _StoreMigrator {
Future<void> complete() async {
await _db.batch((batch) {
for (final entry in _cache.entries) {
if (entry.value == entry.key.defaultValue) {
continue;
}
batch.insert(
_db.metadataEntity,
MetadataEntityCompanion(key: Value(entry.key.key), value: Value(entry.key.encode(entry.value))),