Skip to content

Commit 0921eed

Browse files
committed
db [nfc]: Remove dead code
Signed-off-by: Zixuan James Li <[email protected]>
1 parent 6070a7f commit 0921eed

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

lib/model/database.dart

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
1-
import 'dart:io';
2-
31
import 'package:drift/drift.dart';
4-
import 'package:drift/native.dart';
52
import 'package:drift/remote.dart';
6-
import 'package:path/path.dart' as path;
7-
import 'package:path_provider/path_provider.dart';
83
import 'package:sqlite3/common.dart';
94

105
part 'database.g.dart';
@@ -52,21 +47,10 @@ class UriConverter extends TypeConverter<Uri, String> {
5247
@override Uri fromSql(String fromDb) => Uri.parse(fromDb);
5348
}
5449

55-
LazyDatabase _openConnection() {
56-
return LazyDatabase(() async {
57-
// TODO decide if this path is the right one to use
58-
final dbFolder = await getApplicationDocumentsDirectory();
59-
final file = File(path.join(dbFolder.path, 'db.sqlite'));
60-
return NativeDatabase.createInBackground(file);
61-
});
62-
}
63-
6450
@DriftDatabase(tables: [Accounts])
6551
class AppDatabase extends _$AppDatabase {
6652
AppDatabase(super.e);
6753

68-
AppDatabase.live() : this(_openConnection());
69-
7054
// When updating the schema:
7155
// * Make the change in the table classes, and bump schemaVersion.
7256
// * Export the new schema and generate test migrations:

0 commit comments

Comments
 (0)