mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
use auto migration
This commit is contained in:
parent
2c5b313922
commit
c596102a16
@ -1,5 +1,6 @@
|
||||
package com.github.libretube.db
|
||||
|
||||
import androidx.room.AutoMigration
|
||||
import androidx.room.Database
|
||||
import androidx.room.RoomDatabase
|
||||
import com.github.libretube.db.dao.CustomInstanceDao
|
||||
@ -21,7 +22,10 @@ import com.github.libretube.db.obj.WatchPosition
|
||||
CustomInstance::class,
|
||||
LocalSubscription::class
|
||||
],
|
||||
version = 7
|
||||
version = 7,
|
||||
autoMigrations = [
|
||||
AutoMigration(from = 7, to = 8)
|
||||
]
|
||||
)
|
||||
abstract class AppDatabase : RoomDatabase() {
|
||||
/**
|
||||
|
@ -13,7 +13,6 @@ object DatabaseHolder {
|
||||
AppDatabase::class.java,
|
||||
DATABASE_NAME
|
||||
)
|
||||
.fallbackToDestructiveMigration()
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user