From 7079db555174a31b7b403fc065ed895a039fca61 Mon Sep 17 00:00:00 2001 From: James Isbister Date: Mon, 10 Nov 2025 14:54:32 +0100 Subject: [PATCH] Add scan_indices to Simulations --- app/db/model.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/db/model.py b/app/db/model.py index 51eec9018..f1d8c3100 100644 --- a/app/db/model.py +++ b/app/db/model.py @@ -1450,6 +1450,9 @@ class Simulation(Entity, NameDescriptionVectorMixin): entity_id (uuid.UUID): Foreign key referencing the entity ID. entity (Entity): The entity this simulation is associated with. scan_parameters (JSON_DICT): Scan parameters for the simulation. + scan_indices (JSON_DICT): Dictionary where keys are the names of scan parameters, + and the integer values are the index of this Simulation's value of that scan parameter + in the SimulationCampaign scan_parameters dictionary for that key. """ __tablename__ = EntityType.simulation.value @@ -1473,6 +1476,11 @@ class Simulation(Entity, NameDescriptionVectorMixin): nullable=False, server_default="{}", ) + scan_indices: Mapped[JSON_DICT] = mapped_column( + default={}, + nullable=False, + server_default="{}", + ) __mapper_args__ = { # noqa: RUF012 "polymorphic_identity": __tablename__,