mirror of
https://github.com/hmalik144/Weather-apps.git
synced 2025-12-10 02:05:20 +00:00
- fix db bug (#28)
This commit is contained in:
@@ -5,11 +5,12 @@ import androidx.room.Database
|
||||
import androidx.room.Room
|
||||
import androidx.room.RoomDatabase
|
||||
import androidx.room.TypeConverters
|
||||
import androidx.room.migration.Migration
|
||||
import com.appttude.h_mal.atlas_weather.data.room.entity.EntityItem
|
||||
|
||||
@Database(
|
||||
entities = [EntityItem::class],
|
||||
version = 1,
|
||||
version = 2,
|
||||
exportSchema = false
|
||||
)
|
||||
@TypeConverters(Converter::class)
|
||||
@@ -36,6 +37,7 @@ abstract class AppDatabase : RoomDatabase() {
|
||||
AppDatabase::class.java,
|
||||
"MyDatabase.db"
|
||||
).addTypeConverter(Converter(context))
|
||||
.addMigrations(Migration(1,2) { })
|
||||
.build()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user