Skip to content

Commit 20da4ac

Browse files
rajveermalviyagnprice
authored andcommitted
deps: Update drift to 2.27.0, from 2.26.1
Changelog: https://pub.dev/packages/drift/changelog#2270 One depcrecation: info • 'validateDropped' is deprecated and shouldn't be used. Use field in ValidationOptions instead • test/model/database_test.dart:204:28 • deprecated_member_use info • 'validateDropped' is deprecated and shouldn't be used. Use field in ValidationOptions instead • test/model/database_test.dart:214:59 • deprecated_member_use because of: simolus3/drift@4116b95ef So, update to the new API to fix analyzer warnings.
1 parent 86c679c commit 20da4ac

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

pubspec.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,18 +278,18 @@ packages:
278278
dependency: "direct main"
279279
description:
280280
name: drift
281-
sha256: b584ddeb2b74436735dd2cf746d2d021e19a9a6770f409212fd5cbc2814ada85
281+
sha256: e60c715f045dd33624fc533efb0075e057debec9f39e83843e518f488a0e21fb
282282
url: "https://pub.dev"
283283
source: hosted
284-
version: "2.26.1"
284+
version: "2.27.0"
285285
drift_dev:
286286
dependency: "direct dev"
287287
description:
288288
name: drift_dev
289-
sha256: "54dc207c6e4662741f60e5752678df183957ab907754ffab0372a7082f6d2816"
289+
sha256: "7ad88b8982e753eadcdbc0ea7c7d30500598af733601428b5c9d264baf5106d6"
290290
url: "https://pub.dev"
291291
source: hosted
292-
version: "2.26.1"
292+
version: "2.27.0"
293293
fake_async:
294294
dependency: "direct dev"
295295
description:

test/model/database_test.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'package:checks/checks.dart';
22
import 'package:drift/drift.dart';
33
import 'package:drift/native.dart';
4+
import 'package:drift_dev/api/migrations_common.dart' show ValidationOptions;
45
import 'package:drift_dev/api/migrations_native.dart';
56
import 'package:test/scaffolding.dart';
67
import 'package:zulip/model/database.dart';
@@ -200,8 +201,8 @@ void main() {
200201
final before = AppDatabase(schema.newConnection());
201202
await before.customStatement('CREATE TABLE test_extra (num int)');
202203
await before.customStatement('ALTER TABLE accounts ADD extra_column int');
203-
await check(verifier.migrateAndValidate(
204-
before, toVersion, validateDropped: true)).throws<SchemaMismatch>();
204+
await check(verifier.migrateAndValidate(before, toVersion,
205+
options: const ValidationOptions(validateDropped: true))).throws<SchemaMismatch>();
205206
// Override the schema version by modifying the underlying value
206207
// drift internally keeps track of in the database.
207208
// TODO(drift): Expose a better interface for testing this.
@@ -211,7 +212,8 @@ void main() {
211212
// Simulate starting up the app, with an older schema version that
212213
// does not have the extra tables and columns.
213214
final after = AppDatabase(schema.newConnection());
214-
await verifier.migrateAndValidate(after, toVersion, validateDropped: true);
215+
await verifier.migrateAndValidate(after, toVersion,
216+
options: const ValidationOptions(validateDropped: true));
215217
// Check that a custom migration/setup step of ours got run too.
216218
check(await after.getGlobalSettings()).themeSetting.isNull();
217219
await after.close();

0 commit comments

Comments
 (0)