From 280a2c25203683d07a58a230de0a9106a5825a3a Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 18 Nov 2024 15:49:29 -0500 Subject: [PATCH] rebase into tool request... --- lib/galaxy/model/__init__.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 02c24abb7cb1..4193652c44e4 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -1356,25 +1356,26 @@ class ToolRequest(Base, Dictifiable, RepresentById): tool_source: Mapped["ToolSource"] = relationship() history: Mapped[Optional["History"]] = relationship(back_populates="tool_requests") + implicit_collections: Mapped[List["ToolRequestImplicitCollectionAssociation"]] = relationship(back_populates="tool_request") -class ToolRequestMappedOverOutputDatasetCollectionAssociation(Base, Dictifiable, RepresentById): - __tablename__ = "tool_request_mapped_over_output_dataset_collection_association" +class ToolRequestImplicitCollectionAssociation(Base, Dictifiable, RepresentById): + __tablename__ = "tool_request_implicit_collection_association" id: Mapped[int] = mapped_column(primary_key=True) tool_request_id: Mapped[int] = mapped_column( - ForeignKey("tool_request.id", name="fk_trmoodca_tri"), index=True + ForeignKey("tool_request.id", name="fk_trica_tri"), index=True ) dataset_collection_id: Mapped[int] = mapped_column( - ForeignKey("history_dataset_collection_association.id", name="fk_trmoodca_dci"), index=True + ForeignKey("history_dataset_collection_association.id", name="fk_trica_dci"), index=True ) output_name: Mapped[str] = mapped_column(String(255)) tool_request: Mapped["ToolRequest"] = relationship( - back_populates="mapped_over_output_dataset_collection_associations" + back_populates="implicit_collections" ) dataset_collection: Mapped["HistoryDatasetCollectionAssociation"] = relationship( - back_populates="tool_reqeust", uselist=False + back_populates="tool_request_association", uselist=False ) dict_collection_visible_keys = ["id", "tool_request_id", "dataset_collection_id", "output_name"] @@ -7068,6 +7069,7 @@ class HistoryDatasetCollectionAssociation( back_populates="dataset_collection", ) creating_job_associations: Mapped[List["JobToOutputDatasetCollectionAssociation"]] = relationship(viewonly=True) + tool_request_association: Mapped[Optional["ToolRequestImplicitCollectionAssociation"]] = relationship(back_populates="dataset_collection") dict_dbkeysandextensions_visible_keys = ["dbkeys", "extensions"] editable_keys = ("name", "deleted", "visible")