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