mirror of https://github.com/AMT-Cheif/drift.git
Fix runtime migration verification typo
This commit is contained in:
parent
dfa01c1332
commit
9c72d858ae
|
@ -5,7 +5,7 @@ import 'package:drift/drift.dart';
|
||||||
import 'package:drift_dev/api/migrations.dart';
|
import 'package:drift_dev/api/migrations.dart';
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
|
|
||||||
const kDebugBuild = true;
|
const kDebugMode = true;
|
||||||
|
|
||||||
abstract class _$MyDatabase extends GeneratedDatabase {
|
abstract class _$MyDatabase extends GeneratedDatabase {
|
||||||
_$MyDatabase(QueryExecutor executor) : super(executor);
|
_$MyDatabase(QueryExecutor executor) : super(executor);
|
||||||
|
@ -32,7 +32,7 @@ class MyDatabase extends _$MyDatabase {
|
||||||
beforeOpen: (details) async {
|
beforeOpen: (details) async {
|
||||||
// your existing beforeOpen callback, enable foreign keys, etc.
|
// your existing beforeOpen callback, enable foreign keys, etc.
|
||||||
|
|
||||||
if (kDebugBuild) {
|
if (kDebugMode) {
|
||||||
// This check pulls in a fair amount of code that's not needed
|
// This check pulls in a fair amount of code that's not needed
|
||||||
// anywhere else, so we recommend only doing it in debug builds.
|
// anywhere else, so we recommend only doing it in debug builds.
|
||||||
await validateDatabaseSchema();
|
await validateDatabaseSchema();
|
||||||
|
|
Loading…
Reference in New Issue