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