Drop info field/column from Artist
This commit is contained in:
@@ -449,7 +449,7 @@ interface Database {
|
||||
views = [
|
||||
SortedSongPlaylistMap::class
|
||||
],
|
||||
version = 21,
|
||||
version = 22,
|
||||
exportSchema = true,
|
||||
autoMigrations = [
|
||||
AutoMigration(from = 1, to = 2),
|
||||
@@ -469,6 +469,7 @@ interface Database {
|
||||
AutoMigration(from = 18, to = 19),
|
||||
AutoMigration(from = 19, to = 20),
|
||||
AutoMigration(from = 20, to = 21, spec = DatabaseInitializer.From20To21Migration::class),
|
||||
AutoMigration(from = 21, to = 22, spec = DatabaseInitializer.From21To22Migration::class),
|
||||
],
|
||||
)
|
||||
@TypeConverters(Converters::class)
|
||||
@@ -610,6 +611,9 @@ abstract class DatabaseInitializer protected constructor() : RoomDatabase() {
|
||||
DeleteColumn("Artist", "radioPlaylistId"),
|
||||
)
|
||||
class From20To21Migration : AutoMigrationSpec
|
||||
|
||||
@DeleteColumn.Entries(DeleteColumn("Artist", "info"))
|
||||
class From21To22Migration : AutoMigrationSpec
|
||||
}
|
||||
|
||||
@TypeConverters
|
||||
|
||||
@@ -10,7 +10,6 @@ data class Artist(
|
||||
@PrimaryKey val id: String,
|
||||
val name: String? = null,
|
||||
val thumbnailUrl: String? = null,
|
||||
val info: String? = null,
|
||||
val timestamp: Long? = null,
|
||||
val bookmarkedAt: Long? = null,
|
||||
)
|
||||
|
||||
@@ -9,7 +9,6 @@ object ArtistSaver : Saver<Artist, List<Any?>> {
|
||||
value.id,
|
||||
value.name,
|
||||
value.thumbnailUrl,
|
||||
value.info,
|
||||
value.timestamp,
|
||||
value.bookmarkedAt,
|
||||
)
|
||||
@@ -18,9 +17,8 @@ object ArtistSaver : Saver<Artist, List<Any?>> {
|
||||
id = value[0] as String,
|
||||
name = value[1] as String?,
|
||||
thumbnailUrl = value[2] as String?,
|
||||
info = value[3] as String?,
|
||||
timestamp = value[4] as Long?,
|
||||
bookmarkedAt = value[5] as Long?,
|
||||
timestamp = value[3] as Long?,
|
||||
bookmarkedAt = value[4] as Long?,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,6 @@ fun ArtistScreen(browseId: String) {
|
||||
id = browseId,
|
||||
name = artistPage.name,
|
||||
thumbnailUrl = artistPage.thumbnail?.url,
|
||||
info = artistPage.description,
|
||||
timestamp = System.currentTimeMillis(),
|
||||
bookmarkedAt = artist?.bookmarkedAt
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user