Skip to content

Commit 35bc546

Browse files
author
[SeoHyeonSim]
committed
chore:db-setup-refine
1 parent 4da1f85 commit 35bc546

23 files changed

+2890
-317
lines changed

lib/config/database.dart

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
11
import 'package:drift/drift.dart';
22
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';
35
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';
410
import '../data/tables/places_table.dart';
511
import '../data/tables/schedules_table.dart';
612

713
part 'database.g.dart';
814

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+
])
1027
class AppDatabase extends _$AppDatabase {
1128
// After generating code, this class needs to define a schemaVersion getter
1229
// and a constructor telling drift where the database should be stored.
1330
// These are described in the getting started guide: https://drift.simonbinder.eu/getting-started/#open
1431
AppDatabase() : super(_openConnection());
1532

1633
@override
17-
int get schemaVersion => 1;
34+
int get schemaVersion => 2;
1835

1936
static QueryExecutor _openConnection() {
2037
// driftDatabase from package:drift_flutter stores the database in

0 commit comments

Comments
 (0)