File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,7 @@ class AppDatabase extends _$AppDatabase {
191
191
);
192
192
193
193
Future <void > _createLatestSchema (Migrator m) async {
194
+ assert (debugLog ('Creating DB schema from scratch.' ));
194
195
await m.createAll ();
195
196
// Corresponds to `from4to5` above.
196
197
await into (globalSettings).insert (GlobalSettingsCompanion ());
@@ -205,7 +206,7 @@ class AppDatabase extends _$AppDatabase {
205
206
// This should only ever happen in dev. As a dev convenience,
206
207
// drop everything from the database and start over.
207
208
// TODO(log): log schema downgrade as an error
208
- assert (debugLog ('Downgrading schema from v$from to v$to .' ));
209
+ assert (debugLog ('Downgrading DB schema from v$from to v$to .' ));
209
210
210
211
// In the actual app, the target schema version is always
211
212
// the latest version as of the code that's being run.
@@ -219,6 +220,7 @@ class AppDatabase extends _$AppDatabase {
219
220
}
220
221
assert (1 <= from && from <= to && to <= latestSchemaVersion);
221
222
223
+ assert (debugLog ('Upgrading DB schema from v$from to v$to .' ));
222
224
await m.runMigrationSteps (from: from, to: to, steps: _migrationSteps);
223
225
});
224
226
}
You can’t perform that action at this time.
0 commit comments