You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/src/main/kotlin/com/music/echo/db/MusicDatabase.kt
+24-2Lines changed: 24 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -149,7 +149,7 @@ class MusicDatabase(
149
149
AutoMigration(from =25, to =26),
150
150
AutoMigration(from =26, to =27),
151
151
AutoMigration(from =27, to =28),
152
-
AutoMigration(from =28, to =29),
152
+
153
153
AutoMigration(from =30, to =31),
154
154
AutoMigration(from =31, to =32),
155
155
AutoMigration(from =32, to =33),
@@ -179,6 +179,7 @@ abstract class InternalDatabase : RoomDatabase() {
179
179
MIGRATION_22_24,
180
180
MIGRATION_24_25,
181
181
MIGRATION_27_28,
182
+
MIGRATION_28_29,
182
183
MIGRATION_29_30,
183
184
MIGRATION_36_37,
184
185
MIGRATION_37_38,
@@ -804,8 +805,10 @@ val MIGRATION_27_28 =
804
805
db.execSQL("INSERT INTO `_new_album` (`id`,`playlistId`,`title`,`year`,`thumbnailUrl`,`themeColor`,`songCount`,`duration`,`explicit`,`lastUpdateTime`,`bookmarkedAt`,`likedDate`,`inLibrary`,`isLocal`,`isUploaded`) SELECT `id`,`playlistId`,`title`,`year`,`thumbnailUrl`,`themeColor`,`songCount`,`duration`,`explicit`,`lastUpdateTime`,`bookmarkedAt`,`likedDate`,`inLibrary`,`isLocal`,`isUploaded` FROM `album`")
805
806
db.execSQL("DROP TABLE `album`")
806
807
db.execSQL("ALTER TABLE `_new_album` RENAME TO `album`")
807
-
db.execSQL("CREATE TABLE IF NOT EXISTS `_new_playlist` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `browseId` TEXT, `createdAt` INTEGER, `lastUpdateTime` INTEGER, `isEditable` INTEGER NOT NULL DEFAULT true, `bookmarkedAt` INTEGER, `remoteSongCount` INTEGER, `playEndpointParams` TEXT, `thumbnailUrl` TEXT, `shuffleEndpointParams` TEXT, `radioEndpointParams` TEXT, `isLocal` INTEGER NOT NULL DEFAULT false, PRIMARY KEY(`id`))")
808
+
db.execSQL("CREATE TABLE IF NOT EXISTS `_new_playlist` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `browseId` TEXT, `createdAt` INTEGER, `lastUpdateTime` INTEGER, `isEditable` INTEGER NOT NULL DEFAULT true, `bookmarkedAt` INTEGER, `remoteSongCount` INTEGER, `playEndpointParams` TEXT, `thumbnailUrl` TEXT, `shuffleEndpointParams` TEXT, `radioEndpointParams` TEXT, `isLocal` INTEGER NOT NULL DEFAULT false, `isAutoSync` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`id`))")
808
809
db.execSQL("INSERT INTO `_new_playlist` (`id`,`name`,`browseId`,`createdAt`,`lastUpdateTime`,`isEditable`,`bookmarkedAt`,`remoteSongCount`,`playEndpointParams`,`thumbnailUrl`,`shuffleEndpointParams`,`radioEndpointParams`,`isLocal`) SELECT `id`,`name`,`browseId`,`createdAt`,`lastUpdateTime`,`isEditable`,`bookmarkedAt`,`remoteSongCount`,`playEndpointParams`,`thumbnailUrl`,`shuffleEndpointParams`,`radioEndpointParams`,`isLocal` FROM `playlist`")
810
+
811
+
db.execSQL("UPDATE `_new_playlist` SET `isAutoSync` = 0")
809
812
db.execSQL("DROP TABLE `playlist`")
810
813
db.execSQL("ALTER TABLE `_new_playlist` RENAME TO `playlist`")
811
814
db.execSQL("CREATE VIEW `sorted_song_artist_map` AS SELECT * FROM song_artist_map ORDER BY position")
0 commit comments