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 {
191191 );
192192
193193 Future <void > _createLatestSchema (Migrator m) async {
194+ assert (debugLog ('Creating DB schema from scratch.' ));
194195 await m.createAll ();
195196 // Corresponds to `from4to5` above.
196197 await into (globalSettings).insert (GlobalSettingsCompanion ());
@@ -205,7 +206,7 @@ class AppDatabase extends _$AppDatabase {
205206 // This should only ever happen in dev. As a dev convenience,
206207 // drop everything from the database and start over.
207208 // 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 .' ));
209210
210211 // In the actual app, the target schema version is always
211212 // the latest version as of the code that's being run.
@@ -219,6 +220,7 @@ class AppDatabase extends _$AppDatabase {
219220 }
220221 assert (1 <= from && from <= to && to <= latestSchemaVersion);
221222
223+ assert (debugLog ('Upgrading DB schema from v$from to v$to .' ));
222224 await m.runMigrationSteps (from: from, to: to, steps: _migrationSteps);
223225 });
224226 }
You can’t perform that action at this time.
0 commit comments