dart format
This commit is contained in:
@@ -12,7 +12,18 @@ import 'package:game_tracker/data/tables/result_placement_table.dart';
|
||||
|
||||
part 'database.g.dart';
|
||||
|
||||
@DriftDatabase(tables: [UserTable, GroupTable, UserGroupTable, GameTable, MatchTable, ResultScoreTable, ResultWinTable, ResultPlacementTable])
|
||||
@DriftDatabase(
|
||||
tables: [
|
||||
UserTable,
|
||||
GroupTable,
|
||||
UserGroupTable,
|
||||
GameTable,
|
||||
MatchTable,
|
||||
ResultScoreTable,
|
||||
ResultWinTable,
|
||||
ResultPlacementTable,
|
||||
],
|
||||
)
|
||||
class AppDatabase extends _$AppDatabase {
|
||||
AppDatabase([QueryExecutor? executor]) : super(executor ?? _openConnection());
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'package:drift/drift.dart';
|
||||
import 'group_table.dart';
|
||||
import 'user_table.dart';
|
||||
|
||||
|
||||
class UserGroupTable extends Table {
|
||||
TextColumn get userId => text().references(UserTable, #id)();
|
||||
TextColumn get groupId => text().references(GroupTable, #id)();
|
||||
|
||||
@@ -10,7 +10,7 @@ void main() {
|
||||
create: (context) => AppDatabase(),
|
||||
child: const MyApp(),
|
||||
dispose: (context, db) => db.close(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user