diff --git a/cw_core/lib/db/sqlite.dart b/cw_core/lib/db/sqlite.dart index bbcbf1941..43bef5f38 100644 --- a/cw_core/lib/db/sqlite.dart +++ b/cw_core/lib/db/sqlite.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:cw_core/db/sqlite_debug.dart'; import 'package:cw_core/root_dir.dart'; import 'package:cw_core/utils/print_verbose.dart'; +import 'package:flutter/foundation.dart'; import 'package:sqflite_common_ffi/sqflite_ffi.dart'; import 'package:path/path.dart' as p; @@ -31,6 +32,10 @@ Future sqliteDebugMarkerFile() async { } Future initDb({String? pathOverride}) async { + if (!kDebugMode && !kProfileMode) { + await _initDb(pathOverride: pathOverride); + return; + } final dbDebugMarker = await sqliteDebugMarkerFile(); try { if (dbDebugMarker.existsSync()) {