only enable sqlite debug marker in debug/profile
Omar committed
Jun 18, 2026 at 19:04 UTC
ddaab89979da7058db486250ab10c881e0327235
1 file changed
+5
cw_core/lib/db/sqlite.dart
+5
@@ -3,6 +3,7 @@ import 'dart:io';
3
import 'package:cw_core/db/sqlite_debug.dart';
4
import 'package:cw_core/root_dir.dart';
5
import 'package:cw_core/utils/print_verbose.dart';
6
+import 'package:flutter/foundation.dart';
7
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
8
import 'package:path/path.dart' as p;
9
@@ -31,6 +32,10 @@ Future<File> sqliteDebugMarkerFile() async {
32
}
33
34
Future<void> initDb({String? pathOverride}) async {
35
+ if (!kDebugMode && !kProfileMode) {
36
+ await _initDb(pathOverride: pathOverride);
37
+ return;
38
+ }
39
final dbDebugMarker = await sqliteDebugMarkerFile();
40
try {
41
if (dbDebugMarker.existsSync()) {