|
1 | 1 | import 'package:drift/drift.dart';
|
2 | 2 | import 'package:drift_flutter/drift_flutter.dart';
|
| 3 | +import 'package:on_time_front/data/daos/preparation_schedule_dao.dart'; |
| 4 | +import 'package:on_time_front/data/daos/preparation_user_dao.dart'; |
3 | 5 | import 'package:on_time_front/data/daos/schedule_dao.dart';
|
| 6 | +import 'package:on_time_front/data/daos/user_dao.dart'; |
| 7 | +import 'package:on_time_front/data/tables/preparation_schedule_table.dart'; |
| 8 | +import 'package:on_time_front/data/tables/preparation_user_table.dart'; |
| 9 | +import 'package:on_time_front/data/tables/user_table.dart'; |
4 | 10 | import '../data/tables/places_table.dart';
|
5 | 11 | import '../data/tables/schedules_table.dart';
|
6 | 12 |
|
7 | 13 | part 'database.g.dart';
|
8 | 14 |
|
9 |
| -@DriftDatabase(tables: [Places, Schedules], daos: [ScheduleDao]) |
| 15 | +@DriftDatabase(tables: [ |
| 16 | + Places, |
| 17 | + Schedules, |
| 18 | + Users, |
| 19 | + PreparationSchedules, |
| 20 | + PreparationUsers, |
| 21 | +], daos: [ |
| 22 | + ScheduleDao, |
| 23 | + UserDao, |
| 24 | + PreparationScheduleDao, |
| 25 | + PreparationUserDao, |
| 26 | +]) |
10 | 27 | class AppDatabase extends _$AppDatabase {
|
11 | 28 | // After generating code, this class needs to define a schemaVersion getter
|
12 | 29 | // and a constructor telling drift where the database should be stored.
|
13 | 30 | // These are described in the getting started guide: https://drift.simonbinder.eu/getting-started/#open
|
14 | 31 | AppDatabase() : super(_openConnection());
|
15 | 32 |
|
16 | 33 | @override
|
17 |
| - int get schemaVersion => 1; |
| 34 | + int get schemaVersion => 2; |
18 | 35 |
|
19 | 36 | static QueryExecutor _openConnection() {
|
20 | 37 | // driftDatabase from package:drift_flutter stores the database in
|
|
0 commit comments