refactor: replace drift_flutter with drift_sqlite_async (#28440)

replace drift_flutter with drift_sqlite_async

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2026-06-05 00:01:50 +05:30 committed by GitHub
parent 99281de6ab
commit 58528cad08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 89 additions and 32 deletions

View file

@ -43,8 +43,9 @@ void configureFileDownloaderNotifications() {
abstract final class Bootstrap {
static Future<(Drift, DriftLogger)> initDomain({bool listenStoreUpdates = true, bool shouldBufferLogs = true}) async {
final drift = Drift();
final logDb = DriftLogger();
await configureSqliteCache();
final drift = Drift.sqlite(await openSqliteConnection(name: 'immich'));
final logDb = DriftLogger.sqlite(await openSqliteConnection(name: 'immich_logs'));
final DriftStoreRepository storeRepo = DriftStoreRepository(drift);
await StoreService.init(storeRepository: storeRepo, listenUpdates: listenStoreUpdates);