@@ -24,7 +24,7 @@ import com.manalejandro.odb2bluetooth.data.database.entities.ObdSignal
|
||||
ObdSignal::class,
|
||||
DtcCode::class
|
||||
],
|
||||
version = 1,
|
||||
version = 2,
|
||||
exportSchema = false
|
||||
)
|
||||
abstract class ObdDatabase : RoomDatabase() {
|
||||
|
||||
@@ -9,7 +9,7 @@ import androidx.room.PrimaryKey
|
||||
@Entity(tableName = "brands")
|
||||
data class Brand(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
val id: Int = 0,
|
||||
val id: Int? = null,
|
||||
val name: String
|
||||
)
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import androidx.room.PrimaryKey
|
||||
)
|
||||
data class Generation(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
val id: Int = 0,
|
||||
val id: Int? = null,
|
||||
@ColumnInfo(name = "model_id")
|
||||
val modelId: Int,
|
||||
val name: String,
|
||||
|
||||
@@ -23,7 +23,7 @@ import androidx.room.PrimaryKey
|
||||
)
|
||||
data class Model(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
val id: Int = 0,
|
||||
val id: Int? = null,
|
||||
@ColumnInfo(name = "brand_id")
|
||||
val brandId: Int,
|
||||
val name: String,
|
||||
|
||||
@@ -23,7 +23,7 @@ import androidx.room.PrimaryKey
|
||||
)
|
||||
data class ObdSignal(
|
||||
@PrimaryKey(autoGenerate = true)
|
||||
val id: Int = 0,
|
||||
val id: Int? = null,
|
||||
@ColumnInfo(name = "model_id")
|
||||
val modelId: Int,
|
||||
@ColumnInfo(name = "signal_id")
|
||||
|
||||
Referencia en una nueva incidencia
Block a user