From de3ad4b21ec495411d5ce850cdb9cddc70b2dc13 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 5 Sep 2024 13:13:56 +0800 Subject: [PATCH] :bug: Bug fixes --- lib/services/database/database.dart | 9 ++++++++- pubspec.yaml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/services/database/database.dart b/lib/services/database/database.dart index 50ddc7d..d997835 100755 --- a/lib/services/database/database.dart +++ b/lib/services/database/database.dart @@ -55,7 +55,7 @@ class AppDatabase extends _$AppDatabase { AppDatabase() : super(_openConnection()); @override - int get schemaVersion => 2; + int get schemaVersion => 3; @override MigrationStrategy get migration { @@ -67,6 +67,13 @@ class AppDatabase extends _$AppDatabase { if (from < 2) { await m.addColumn(preferencesTable, preferencesTable.playerWakelock); } + if (from > 3) { + await m.addColumn( + preferencesTable, preferencesTable.neteaseApiInstance); + await m.dropColumn( + preferencesTable, preferencesTable.audioSource.name); + await m.addColumn(preferencesTable, preferencesTable.audioSource); + } }, ); } diff --git a/pubspec.yaml b/pubspec.yaml index 267a0c3..402d8a3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+8 +version: 1.0.0+9 environment: sdk: ^3.5.0