diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/message_instance_correlation.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/message_instance_correlation.py index 92ab8f14a..755e6563a 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/message_instance_correlation.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/message_instance_correlation.py @@ -30,7 +30,7 @@ class MessageInstanceCorrelationRuleModel(SpiffworkflowBaseDBModel): id = db.Column(db.Integer, primary_key=True) message_instance_id = db.Column(ForeignKey(MessageInstanceModel.id), nullable=False, index=True) # type: ignore - name: str = db.Column(db.String(50), nullable=False) + name: str = db.Column(db.String(50), nullable=False, index=True) retrieval_expression: str = db.Column(db.String(255)) updated_at_in_seconds: int = db.Column(db.Integer) created_at_in_seconds: int = db.Column(db.Integer) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py index 20492ce2d..138aac26f 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/process_instance.py @@ -61,7 +61,7 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel): process_initiator = relationship("UserModel") bpmn_process_definition_id: int | None = db.Column( - ForeignKey(BpmnProcessDefinitionModel.id), nullable=True # type: ignore + ForeignKey(BpmnProcessDefinitionModel.id), nullable=True, index=True # type: ignore ) bpmn_process_definition = relationship(BpmnProcessDefinitionModel) bpmn_process_id: int | None = db.Column(ForeignKey(BpmnProcessModel.id), nullable=True) # type: ignore @@ -90,7 +90,7 @@ class ProcessInstanceModel(SpiffworkflowBaseDBModel): ) # type: ignore bpmn_json: str | None = deferred(db.Column(db.JSON)) # type: ignore - start_in_seconds: int | None = db.Column(db.Integer) + start_in_seconds: int | None = db.Column(db.Integer, index=True) end_in_seconds: int | None = db.Column(db.Integer) updated_at_in_seconds: int = db.Column(db.Integer) created_at_in_seconds: int = db.Column(db.Integer) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/task_definition.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/task_definition.py index 6868f2cf2..893331a8f 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/task_definition.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/task_definition.py @@ -29,9 +29,9 @@ class TaskDefinitionModel(SpiffworkflowBaseDBModel): bpmn_identifier: str = db.Column(db.String(255), nullable=False, index=True) bpmn_name: str = db.Column(db.String(255), nullable=True, index=True) + typename: str = db.Column(db.String(255), nullable=False, index=True) properties_json: dict = db.Column(db.JSON, nullable=False) - typename: str = db.Column(db.String(255), nullable=False) updated_at_in_seconds: int = db.Column(db.Integer) created_at_in_seconds: int = db.Column(db.Integer) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/models/user.py b/spiffworkflow-backend/src/spiffworkflow_backend/models/user.py index 4b55e8b6e..1f667e0a3 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/models/user.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/models/user.py @@ -28,11 +28,12 @@ class UserModel(SpiffworkflowBaseDBModel): id: int = db.Column(db.Integer, primary_key=True) username: str = db.Column(db.String(255), nullable=False, unique=True) + email = db.Column(db.String(255), index=True) + + service = db.Column(db.String(255), nullable=False, unique=False, index=True) # not 'openid' -- google, aws + service_id = db.Column(db.String(255), nullable=False, unique=False, index=True) - service = db.Column(db.String(255), nullable=False, unique=False) # not 'openid' -- google, aws - service_id = db.Column(db.String(255), nullable=False, unique=False) display_name = db.Column(db.String(255)) - email = db.Column(db.String(255)) tenant_specific_field_1: str | None = db.Column(db.String(255)) tenant_specific_field_2: str | None = db.Column(db.String(255)) tenant_specific_field_3: str | None = db.Column(db.String(255))