Signed-off-by: ale <ale@manalejandro.com>
Este commit está contenido en:
ale
2026-01-11 16:36:28 +01:00
padre 03346c64bf
commit 8c30105a4c
Se han modificado 4 ficheros con 16 adiciones y 7 borrados

Ver fichero

@@ -24,7 +24,7 @@ import com.manalejandro.odb2bluetooth.data.database.entities.ObdSignal
ObdSignal::class,
DtcCode::class
],
version = 2,
version = 3,
exportSchema = false
)
abstract class ObdDatabase : RoomDatabase() {

Ver fichero

@@ -16,10 +16,13 @@ import androidx.room.PrimaryKey
entity = Model::class,
parentColumns = ["id"],
childColumns = ["model_id"],
onDelete = ForeignKey.CASCADE
onDelete = ForeignKey.NO_ACTION
)
],
indices = [Index("model_id")]
indices = [
Index("model_id", name = "index_generations_model_id"),
Index("model_id", name = "idx_generations_model")
]
)
data class Generation(
@PrimaryKey(autoGenerate = true)

Ver fichero

@@ -16,10 +16,13 @@ import androidx.room.PrimaryKey
entity = Brand::class,
parentColumns = ["id"],
childColumns = ["brand_id"],
onDelete = ForeignKey.CASCADE
onDelete = ForeignKey.NO_ACTION
)
],
indices = [Index("brand_id")]
indices = [
Index("brand_id", name = "index_models_brand_id"),
Index("brand_id", name = "idx_models_brand")
]
)
data class Model(
@PrimaryKey(autoGenerate = true)

Ver fichero

@@ -16,10 +16,13 @@ import androidx.room.PrimaryKey
entity = Model::class,
parentColumns = ["id"],
childColumns = ["model_id"],
onDelete = ForeignKey.CASCADE
onDelete = ForeignKey.NO_ACTION
)
],
indices = [Index("model_id")]
indices = [
Index("model_id", name = "index_obd_signals_model_id"),
Index("model_id", name = "idx_signals_model")
]
)
data class ObdSignal(
@PrimaryKey(autoGenerate = true)