diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 0e1de33ec2de..87a38c424040 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -99,6 +99,8 @@ column_property, deferred, joinedload, + Mapped, + mapped_column, object_session, Query, reconstructor, @@ -430,7 +432,7 @@ class WorkerProcess(Base, UsesCreateAndUpdateTime): __tablename__ = "worker_process" __table_args__ = (UniqueConstraint("server_name", "hostname"),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) server_name = Column(String(255), index=True) hostname = Column(String(255)) pid = Column(Integer) @@ -677,7 +679,7 @@ class User(Base, Dictifiable, RepresentById): __tablename__ = "galaxy_user" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) email = Column(TrimmedString(255), index=True, nullable=False) @@ -1202,7 +1204,7 @@ def __init__(self, user, token=None): class DynamicTool(Base, Dictifiable, RepresentById): __tablename__ = "dynamic_tool" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) uuid = Column(UUIDType()) create_time = Column(DateTime, default=now) update_time = Column(DateTime, index=True, default=now, onupdate=now) @@ -1239,7 +1241,7 @@ def __init__(self, plugin, metric_name, metric_value): class JobMetricText(BaseJobMetric, RepresentById): __tablename__ = "job_metric_text" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) plugin = Column(Unicode(255)) metric_name = Column(Unicode(255)) @@ -1249,7 +1251,7 @@ class JobMetricText(BaseJobMetric, RepresentById): class JobMetricNumeric(BaseJobMetric, RepresentById): __tablename__ = "job_metric_numeric" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) plugin = Column(Unicode(255)) metric_name = Column(Unicode(255)) @@ -1259,7 +1261,7 @@ class JobMetricNumeric(BaseJobMetric, RepresentById): class TaskMetricText(BaseJobMetric, RepresentById): __tablename__ = "task_metric_text" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) task_id = Column(Integer, ForeignKey("task.id"), index=True) plugin = Column(Unicode(255)) metric_name = Column(Unicode(255)) @@ -1269,7 +1271,7 @@ class TaskMetricText(BaseJobMetric, RepresentById): class TaskMetricNumeric(BaseJobMetric, RepresentById): __tablename__ = "task_metric_numeric" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) task_id = Column(Integer, ForeignKey("task.id"), index=True) plugin = Column(Unicode(255)) metric_name = Column(Unicode(255)) @@ -1290,7 +1292,7 @@ class Job(Base, JobLike, UsesCreateAndUpdateTime, Dictifiable, Serializable): __tablename__ = "job" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now, index=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) @@ -2057,7 +2059,7 @@ class Task(Base, JobLike, RepresentById): __tablename__ = "task" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) execution_time = Column(DateTime) update_time = Column(DateTime, default=now, onupdate=now) @@ -2227,7 +2229,7 @@ def set_prepare_input_files_cmd(self, prepare_input_files_cmd): class JobParameter(Base, RepresentById): __tablename__ = "job_parameter" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) name = Column(String(255)) value = Column(TEXT) @@ -2243,7 +2245,7 @@ def copy(self): class JobToInputDatasetAssociation(Base, RepresentById): __tablename__ = "job_to_input_dataset" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) dataset_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) dataset_version = Column(Integer) @@ -2261,7 +2263,7 @@ def __init__(self, name, dataset): class JobToOutputDatasetAssociation(Base, RepresentById): __tablename__ = "job_to_output_dataset" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) dataset_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) name = Column(String(255)) @@ -2281,7 +2283,7 @@ def item(self): class JobToInputDatasetCollectionAssociation(Base, RepresentById): __tablename__ = "job_to_input_dataset_collection" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) dataset_collection_id = Column(Integer, ForeignKey("history_dataset_collection_association.id"), index=True) name = Column(String(255)) @@ -2296,7 +2298,7 @@ def __init__(self, name, dataset_collection): class JobToInputDatasetCollectionElementAssociation(Base, RepresentById): __tablename__ = "job_to_input_dataset_collection_element" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) dataset_collection_element_id = Column(Integer, ForeignKey("dataset_collection_element.id"), index=True) name = Column(Unicode(255)) @@ -2313,7 +2315,7 @@ def __init__(self, name, dataset_collection_element): class JobToOutputDatasetCollectionAssociation(Base, RepresentById): __tablename__ = "job_to_output_dataset_collection" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) dataset_collection_id = Column(Integer, ForeignKey("history_dataset_collection_association.id"), index=True) name = Column(Unicode(255)) @@ -2335,7 +2337,7 @@ def item(self): class JobToImplicitOutputDatasetCollectionAssociation(Base, RepresentById): __tablename__ = "job_to_implicit_output_dataset_collection" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) dataset_collection_id = Column(Integer, ForeignKey("dataset_collection.id"), index=True) name = Column(Unicode(255)) @@ -2350,7 +2352,7 @@ def __init__(self, name, dataset_collection): class JobToInputLibraryDatasetAssociation(Base, RepresentById): __tablename__ = "job_to_input_library_dataset" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) ldda_id = Column(Integer, ForeignKey("library_dataset_dataset_association.id"), index=True) name = Column(Unicode(255)) @@ -2366,7 +2368,7 @@ def __init__(self, name, dataset): class JobToOutputLibraryDatasetAssociation(Base, RepresentById): __tablename__ = "job_to_output_library_dataset" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) ldda_id = Column(Integer, ForeignKey("library_dataset_dataset_association.id"), index=True) name = Column(Unicode(255)) @@ -2384,7 +2386,7 @@ def __init__(self, name, dataset): class JobStateHistory(Base, RepresentById): __tablename__ = "job_state_history" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) job_id = Column(Integer, ForeignKey("job.id"), index=True) state = Column(String(64), index=True) @@ -2399,7 +2401,7 @@ def __init__(self, job): class ImplicitlyCreatedDatasetCollectionInput(Base, RepresentById): __tablename__ = "implicitly_created_dataset_collection_inputs" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) dataset_collection_id = Column(Integer, ForeignKey("history_dataset_collection_association.id"), index=True) input_dataset_collection_id = Column(Integer, ForeignKey("history_dataset_collection_association.id"), index=True) name = Column(Unicode(255)) @@ -2420,7 +2422,7 @@ def __init__(self, name, input_dataset_collection): class ImplicitCollectionJobs(Base, Serializable): __tablename__ = "implicit_collection_jobs" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) populated_state = Column(TrimmedString(64), default="new", nullable=False) jobs = relationship( "ImplicitCollectionJobsJobAssociation", back_populates="implicit_collection_jobs", cascade_backrefs=False @@ -2451,7 +2453,7 @@ def _serialize(self, id_encoder, serialization_options): class ImplicitCollectionJobsJobAssociation(Base, RepresentById): __tablename__ = "implicit_collection_jobs_job_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) implicit_collection_jobs_id = Column(Integer, ForeignKey("implicit_collection_jobs.id"), index=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) # Consider making this nullable... order_index = Column(Integer, nullable=False) @@ -2462,7 +2464,7 @@ class ImplicitCollectionJobsJobAssociation(Base, RepresentById): class PostJobAction(Base, RepresentById): __tablename__ = "post_job_action" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id"), index=True, nullable=True) action_type = Column(String(255), nullable=False) output_name = Column(String(255), nullable=True) @@ -2484,7 +2486,7 @@ def __init__(self, action_type, workflow_step=None, output_name=None, action_arg class PostJobActionAssociation(Base, RepresentById): __tablename__ = "post_job_action_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True, nullable=False) post_job_action_id = Column(Integer, ForeignKey("post_job_action.id"), index=True, nullable=False) post_job_action = relationship("PostJobAction") @@ -2504,7 +2506,7 @@ def __init__(self, pja, job=None, job_id=None): class JobExternalOutputMetadata(Base, RepresentById): __tablename__ = "job_external_output_metadata" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) history_dataset_association_id = Column( Integer, ForeignKey("history_dataset_association.id"), index=True, nullable=True @@ -2561,7 +2563,7 @@ def __eq__(self, other): class JobExportHistoryArchive(Base, RepresentById): __tablename__ = "job_export_history_archive" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) dataset_id = Column(Integer, ForeignKey("dataset.id"), index=True) @@ -2649,7 +2651,7 @@ def to_dict(self): class JobImportHistoryArchive(Base, RepresentById): __tablename__ = "job_import_history_archive" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) archive_dir = Column(TEXT) @@ -2661,7 +2663,7 @@ class StoreExportAssociation(Base, RepresentById): __tablename__ = "store_export_association" __table_args__ = (Index("ix_store_export_object", "object_id", "object_type"),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) task_uuid = Column(UUIDType(), index=True, unique=True) create_time = Column(DateTime, default=now) object_type = Column(TrimmedString(32)) @@ -2672,7 +2674,7 @@ class StoreExportAssociation(Base, RepresentById): class JobContainerAssociation(Base, RepresentById): __tablename__ = "job_container_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) container_type = Column(TEXT) container_name = Column(TEXT) @@ -2691,7 +2693,7 @@ def __init__(self, **kwd): class InteractiveToolEntryPoint(Base, Dictifiable, RepresentById): __tablename__ = "interactivetool_entry_point" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) name = Column(TEXT) token = Column(TEXT) @@ -2767,7 +2769,7 @@ def output_datasets_ids(self): class GenomeIndexToolData(Base, RepresentById): # TODO: params arg is lost __tablename__ = "genome_index_tool_data" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True) dataset_id = Column(Integer, ForeignKey("dataset.id"), index=True) fasta_path = Column(String(255)) @@ -2783,7 +2785,7 @@ class GenomeIndexToolData(Base, RepresentById): # TODO: params arg is lost class Group(Base, Dictifiable, RepresentById): __tablename__ = "galaxy_group" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) name = Column(String(255), index=True, unique=True) @@ -2803,7 +2805,7 @@ def __init__(self, name=None): class UserGroupAssociation(Base, RepresentById): __tablename__ = "user_group_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) group_id = Column(Integer, ForeignKey("galaxy_group.id"), index=True) create_time = Column(DateTime, default=now) @@ -2820,7 +2822,7 @@ def __init__(self, user, group): class Notification(Base, Dictifiable, RepresentById): __tablename__ = "notification" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) publication_time = Column( @@ -2852,7 +2854,7 @@ def __init__(self, source: str, category: str, variant: str, content): class UserNotificationAssociation(Base, RepresentById): __tablename__ = "user_notification_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) notification_id = Column(Integer, ForeignKey("notification.id"), index=True) seen_time = Column(DateTime, nullable=True) @@ -2911,7 +2913,7 @@ class History(Base, HasTags, Dictifiable, UsesAnnotations, HasName, Serializable __tablename__ = "history" __table_args__ = (Index("ix_history_slug", "slug", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) _update_time = Column("update_time", DateTime, index=True, default=now, onupdate=now) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -3480,7 +3482,7 @@ class UserShareAssociation(RepresentById): class HistoryUserShareAssociation(Base, UserShareAssociation): __tablename__ = "history_user_share_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) user = relationship("User") @@ -3490,7 +3492,7 @@ class HistoryUserShareAssociation(Base, UserShareAssociation): class UserRoleAssociation(Base, RepresentById): __tablename__ = "user_role_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) role_id = Column(Integer, ForeignKey("role.id"), index=True) create_time = Column(DateTime, default=now) @@ -3508,7 +3510,7 @@ def __init__(self, user, role): class GroupRoleAssociation(Base, RepresentById): __tablename__ = "group_role_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) group_id = Column(Integer, ForeignKey("galaxy_group.id"), index=True) role_id = Column(Integer, ForeignKey("role.id"), index=True) create_time = Column(DateTime, default=now) @@ -3525,7 +3527,7 @@ def __init__(self, group, role): class Role(Base, Dictifiable, RepresentById): __tablename__ = "role" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) name = Column(String(255), index=True, unique=True) @@ -3560,7 +3562,7 @@ class UserQuotaSourceUsage(Base, Dictifiable, RepresentById): dict_element_visible_keys = ["disk_usage", "quota_source_label"] - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) quota_source_label = Column(String(32), index=True) # user had an index on disk_usage - does that make any sense? -John @@ -3571,7 +3573,7 @@ class UserQuotaSourceUsage(Base, Dictifiable, RepresentById): class UserQuotaAssociation(Base, Dictifiable, RepresentById): __tablename__ = "user_quota_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) quota_id = Column(Integer, ForeignKey("quota.id"), index=True) create_time = Column(DateTime, default=now) @@ -3590,7 +3592,7 @@ def __init__(self, user, quota): class GroupQuotaAssociation(Base, Dictifiable, RepresentById): __tablename__ = "group_quota_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) group_id = Column(Integer, ForeignKey("galaxy_group.id"), index=True) quota_id = Column(Integer, ForeignKey("quota.id"), index=True) create_time = Column(DateTime, default=now) @@ -3610,7 +3612,7 @@ class Quota(Base, Dictifiable, RepresentById): __tablename__ = "quota" __table_args__ = (Index("ix_quota_quota_source_label", "quota_source_label"),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) name = Column(String(255), index=True, unique=True) @@ -3672,7 +3674,7 @@ def display_amount(self): class DefaultQuotaAssociation(Base, Dictifiable, RepresentById): __tablename__ = "default_quota_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) type = Column(String(32)) @@ -3695,7 +3697,7 @@ def __init__(self, type, quota): class DatasetPermissions(Base, RepresentById): __tablename__ = "dataset_permissions" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) action = Column(TEXT) @@ -3717,7 +3719,7 @@ def __init__(self, action, dataset, role=None, role_id=None): class LibraryPermissions(Base, RepresentById): __tablename__ = "library_permissions" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) action = Column(TEXT) @@ -3739,7 +3741,7 @@ def __init__(self, action, library_item, role): class LibraryFolderPermissions(Base, RepresentById): __tablename__ = "library_folder_permissions" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) action = Column(TEXT) @@ -3761,7 +3763,7 @@ def __init__(self, action, library_item, role): class LibraryDatasetPermissions(Base, RepresentById): __tablename__ = "library_dataset_permissions" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) action = Column(TEXT) @@ -3783,7 +3785,7 @@ def __init__(self, action, library_item, role): class LibraryDatasetDatasetAssociationPermissions(Base, RepresentById): __tablename__ = "library_dataset_dataset_association_permissions" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) action = Column(TEXT) @@ -3807,7 +3809,7 @@ def __init__(self, action, library_item, role): class DefaultUserPermissions(Base, RepresentById): __tablename__ = "default_user_permissions" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) action = Column(TEXT) role_id = Column(Integer, ForeignKey("role.id"), index=True) @@ -3824,7 +3826,7 @@ def __init__(self, user, action, role): class DefaultHistoryPermissions(Base, RepresentById): __tablename__ = "default_history_permissions" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) action = Column(TEXT) role_id = Column(Integer, ForeignKey("role.id"), index=True) @@ -3848,7 +3850,7 @@ def flush(self): class Dataset(Base, StorableObject, Serializable): __tablename__ = "dataset" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) job_id = Column(Integer, ForeignKey("job.id"), index=True, nullable=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, index=True, default=now, onupdate=now) @@ -4220,7 +4222,7 @@ def to_int(n) -> Optional[int]: class DatasetSource(Base, Dictifiable, Serializable): __tablename__ = "dataset_source" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) dataset_id = Column(Integer, ForeignKey("dataset.id"), index=True) source_uri = Column(TEXT) extra_files_path = Column(TEXT) @@ -4258,7 +4260,7 @@ def copy(self) -> "DatasetSource": class DatasetSourceHash(Base, Serializable): __tablename__ = "dataset_source_hash" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) dataset_source_id = Column(Integer, ForeignKey("dataset_source.id"), index=True) hash_function = Column(TEXT) hash_value = Column(TEXT) @@ -4283,7 +4285,7 @@ def copy(self) -> "DatasetSourceHash": class DatasetHash(Base, Dictifiable, Serializable): __tablename__ = "dataset_hash" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) dataset_id = Column(Integer, ForeignKey("dataset.id"), index=True) hash_function = Column(TEXT) hash_value = Column(TEXT) @@ -5304,7 +5306,7 @@ def type_id(cls): class HistoryDatasetAssociationHistory(Base, Serializable): __tablename__ = "history_dataset_association_history" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_dataset_association_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) update_time = Column(DateTime, default=now) version = Column(Integer) @@ -5338,7 +5340,7 @@ def __init__( class HistoryDatasetAssociationDisplayAtAuthorization(Base, RepresentById): __tablename__ = "history_dataset_association_display_at_authorization" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, index=True, default=now, onupdate=now) history_dataset_association_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) @@ -5356,7 +5358,7 @@ def __init__(self, hda=None, user=None, site=None): class HistoryDatasetAssociationSubset(Base, RepresentById): __tablename__ = "history_dataset_association_subset" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_dataset_association_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) history_dataset_association_subset_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) location = Column(Unicode(255), index=True) @@ -5384,7 +5386,7 @@ def __init__(self, hda, subset, location): class Library(Base, Dictifiable, HasName, Serializable): __tablename__ = "library" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) root_folder_id = Column(Integer, ForeignKey("library_folder.id"), index=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) @@ -5462,7 +5464,7 @@ class LibraryFolder(Base, Dictifiable, HasName, Serializable): __tablename__ = "library_folder" __table_args__ = (Index("ix_library_folder_name", "name", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) parent_id = Column(Integer, ForeignKey("library_folder.id"), nullable=True, index=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) @@ -5603,7 +5605,7 @@ def parent_library(self): class LibraryDataset(Base, Serializable): __tablename__ = "library_dataset" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) # current version of dataset, if null, there is not a current version selected library_dataset_dataset_association_id = Column( Integer, @@ -5909,7 +5911,7 @@ def update_parent_folder_update_times(self): class ExtendedMetadata(Base, RepresentById): __tablename__ = "extended_metadata" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) data = Column(MutableJSONType) children = relationship("ExtendedMetadataIndex", back_populates="extended_metadata") @@ -5920,7 +5922,7 @@ def __init__(self, data): class ExtendedMetadataIndex(Base, RepresentById): __tablename__ = "extended_metadata_index" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) extended_metadata_id = Column( Integer, ForeignKey("extended_metadata.id", onupdate="CASCADE", ondelete="CASCADE"), index=True ) @@ -5937,7 +5939,7 @@ def __init__(self, extended_metadata, path, value): class LibraryInfoAssociation(Base, RepresentById): __tablename__ = "library_info_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) library_id = Column(Integer, ForeignKey("library.id"), index=True) form_definition_id = Column(Integer, ForeignKey("form_definition.id"), index=True) form_values_id = Column(Integer, ForeignKey("form_values.id"), index=True) @@ -5967,7 +5969,7 @@ def __init__(self, library, form_definition, info, inheritable=False): class LibraryFolderInfoAssociation(Base, RepresentById): __tablename__ = "library_folder_info_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) library_folder_id = Column(Integer, ForeignKey("library_folder.id"), nullable=True, index=True) form_definition_id = Column(Integer, ForeignKey("form_definition.id"), index=True) form_values_id = Column(Integer, ForeignKey("form_values.id"), index=True) @@ -5998,7 +6000,7 @@ def __init__(self, folder, form_definition, info, inheritable=False): class LibraryDatasetDatasetInfoAssociation(Base, RepresentById): __tablename__ = "library_dataset_dataset_info_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) library_dataset_dataset_association_id = Column( Integer, ForeignKey("library_dataset_dataset_association.id"), nullable=True, index=True ) @@ -6038,7 +6040,7 @@ def inheritable(self): class ImplicitlyConvertedDatasetAssociation(Base, RepresentById): __tablename__ = "implicitly_converted_dataset_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) hda_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True, nullable=True) @@ -6124,7 +6126,7 @@ def produce_filter(self, table): class DatasetCollection(Base, Dictifiable, UsesAnnotations, Serializable): __tablename__ = "dataset_collection" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) collection_type = Column(Unicode(255), nullable=False) populated_state = Column(TrimmedString(64), default="ok", nullable=False) populated_state_message = Column(TEXT) @@ -6582,7 +6584,7 @@ class HistoryDatasetCollectionAssociation( __tablename__ = "history_dataset_collection_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) collection_id = Column(Integer, ForeignKey("dataset_collection.id"), index=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) name = Column(TrimmedString(255)) @@ -6962,7 +6964,7 @@ class LibraryDatasetCollectionAssociation(Base, DatasetCollectionInstance, Repre __tablename__ = "library_dataset_collection_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) collection_id = Column(Integer, ForeignKey("dataset_collection.id"), index=True) folder_id = Column(Integer, ForeignKey("library_folder.id"), index=True) name = Column(TrimmedString(255)) @@ -7006,7 +7008,7 @@ class DatasetCollectionElement(Base, Dictifiable, Serializable): __tablename__ = "dataset_collection_element" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) # Parent collection id describing what collection this element belongs to. dataset_collection_id = Column(Integer, ForeignKey("dataset_collection.id"), index=True, nullable=False) # Child defined by this association - HDA, LDDA, or another dataset association... @@ -7194,7 +7196,7 @@ def _serialize(self, id_encoder, serialization_options): class Event(Base, RepresentById): __tablename__ = "event" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) history_id = Column(Integer, ForeignKey("history.id"), index=True, nullable=True) @@ -7211,7 +7213,7 @@ class Event(Base, RepresentById): class GalaxySession(Base, RepresentById): __tablename__ = "galaxy_session" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True, nullable=True) @@ -7257,7 +7259,7 @@ def set_disk_usage(self, bytes): class GalaxySessionToHistoryAssociation(Base, RepresentById): __tablename__ = "galaxy_session_to_history" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) session_id = Column(Integer, ForeignKey("galaxy_session.id"), index=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) @@ -7289,7 +7291,7 @@ class StoredWorkflow(Base, HasTags, Dictifiable, RepresentById): __tablename__ = "stored_workflow" __table_args__ = (Index("ix_stored_workflow_slug", "slug", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now, index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True, nullable=False) @@ -7448,7 +7450,7 @@ class Workflow(Base, Dictifiable, RepresentById): __tablename__ = "workflow" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) # workflows will belong to either a stored workflow or a parent/nesting workflow. @@ -7631,7 +7633,7 @@ class WorkflowStep(Base, RepresentById): __tablename__ = "workflow_step" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) workflow_id = Column(Integer, ForeignKey("workflow.id"), index=True, nullable=False) @@ -7947,7 +7949,7 @@ class WorkflowStepInput(Base, RepresentById): ), ) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id"), index=True) name = Column(TEXT) merge_type = Column(TEXT) @@ -7991,7 +7993,7 @@ def copy(self, copied_step): class WorkflowStepConnection(Base, RepresentById): __tablename__ = "workflow_step_connection" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) output_step_id = Column(Integer, ForeignKey("workflow_step.id"), index=True) input_step_input_id = Column(Integer, ForeignKey("workflow_step_input.id"), index=True) output_name = Column(TEXT) @@ -8047,7 +8049,7 @@ def copy(self): class WorkflowOutput(Base, Serializable): __tablename__ = "workflow_output" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id"), index=True, nullable=False) output_name = Column(String(255), nullable=True) label = Column(Unicode(255)) @@ -8088,7 +8090,7 @@ class WorkflowComment(Base, RepresentById): __tablename__ = "workflow_comment" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) order_index: int = Column(Integer) workflow_id = Column(Integer, ForeignKey("workflow.id"), index=True, nullable=False) position = Column(MutableJSONType) @@ -8159,7 +8161,7 @@ def from_dict(dict): class StoredWorkflowUserShareAssociation(Base, UserShareAssociation): __tablename__ = "stored_workflow_user_share_connection" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) stored_workflow_id = Column(Integer, ForeignKey("stored_workflow.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) user = relationship("User") @@ -8169,7 +8171,7 @@ class StoredWorkflowUserShareAssociation(Base, UserShareAssociation): class StoredWorkflowMenuEntry(Base, RepresentById): __tablename__ = "stored_workflow_menu_entry" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) stored_workflow_id = Column(Integer, ForeignKey("stored_workflow.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) order_index = Column(Integer) @@ -8189,7 +8191,7 @@ class StoredWorkflowMenuEntry(Base, RepresentById): class WorkflowInvocation(Base, UsesCreateAndUpdateTime, Dictifiable, Serializable): __tablename__ = "workflow_invocation" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now, index=True) workflow_id = Column(Integer, ForeignKey("workflow.id"), index=True, nullable=False) @@ -8742,7 +8744,7 @@ def log_str(self): class WorkflowInvocationToSubworkflowInvocationAssociation(Base, Dictifiable, RepresentById): __tablename__ = "workflow_invocation_to_subworkflow_invocation_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id", name="fk_wfi_swi_wfi"), index=True) subworkflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id", name="fk_wfi_swi_swi"), index=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id", name="fk_wfi_swi_ws")) @@ -8770,7 +8772,7 @@ class WorkflowInvocationToSubworkflowInvocationAssociation(Base, Dictifiable, Re class WorkflowInvocationMessage(Base, Dictifiable, Serializable): __tablename__ = "workflow_invocation_message" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id"), index=True, nullable=False) reason = Column(String(32)) details = Column(TrimmedString(255), nullable=True) @@ -8843,7 +8845,7 @@ def is_split_configuration(self): class WorkflowInvocationStep(Base, Dictifiable, Serializable): __tablename__ = "workflow_invocation_step" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) workflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id"), index=True, nullable=False) @@ -9054,7 +9056,7 @@ class WorkflowRequestInputParameter(Base, Dictifiable, Serializable): __tablename__ = "workflow_request_input_parameters" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_id = Column( Integer, ForeignKey("workflow_invocation.id", onupdate="CASCADE", ondelete="CASCADE"), index=True ) @@ -9084,7 +9086,7 @@ class WorkflowRequestStepState(Base, Dictifiable, Serializable): __tablename__ = "workflow_request_step_states" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_id = Column( Integer, ForeignKey("workflow_invocation.id", onupdate="CASCADE", ondelete="CASCADE"), index=True ) @@ -9107,7 +9109,7 @@ class WorkflowRequestToInputDatasetAssociation(Base, Dictifiable, Serializable): __tablename__ = "workflow_request_to_input_dataset" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) name = Column(String(255)) workflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id"), index=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id")) @@ -9135,7 +9137,7 @@ class WorkflowRequestToInputDatasetCollectionAssociation(Base, Dictifiable, Seri __tablename__ = "workflow_request_to_input_collection_dataset" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) name = Column(String(255)) workflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id"), index=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id")) @@ -9162,7 +9164,7 @@ class WorkflowRequestInputStepParameter(Base, Dictifiable, Serializable): __tablename__ = "workflow_request_input_step_parameter" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id"), index=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id")) parameter_value = Column(MutableJSONType) @@ -9184,7 +9186,7 @@ class WorkflowInvocationOutputDatasetAssociation(Base, Dictifiable, Serializable __tablename__ = "workflow_invocation_output_dataset_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id"), index=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id"), index=True) dataset_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) @@ -9211,7 +9213,7 @@ class WorkflowInvocationOutputDatasetCollectionAssociation(Base, Dictifiable, Se __tablename__ = "workflow_invocation_output_dataset_collection_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id", name="fk_wiodca_wii"), index=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id", name="fk_wiodca_wsi"), index=True) dataset_collection_id = Column( @@ -9242,7 +9244,7 @@ class WorkflowInvocationOutputValue(Base, Dictifiable, Serializable): __tablename__ = "workflow_invocation_output_value" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_id = Column(Integer, ForeignKey("workflow_invocation.id"), index=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id")) workflow_output_id = Column(Integer, ForeignKey("workflow_output.id"), index=True) @@ -9281,7 +9283,7 @@ class WorkflowInvocationStepOutputDatasetAssociation(Base, Dictifiable, Represen __tablename__ = "workflow_invocation_step_output_dataset_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_step_id = Column(Integer, ForeignKey("workflow_invocation_step.id"), index=True) dataset_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) output_name = Column(String(255), nullable=True) @@ -9296,7 +9298,7 @@ class WorkflowInvocationStepOutputDatasetCollectionAssociation(Base, Dictifiable __tablename__ = "workflow_invocation_step_output_dataset_collection_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_invocation_step_id = Column( Integer, ForeignKey("workflow_invocation_step.id", name="fk_wisodca_wisi"), index=True ) @@ -9315,7 +9317,7 @@ class WorkflowInvocationStepOutputDatasetCollectionAssociation(Base, Dictifiable class MetadataFile(Base, StorableObject, Serializable): __tablename__ = "metadata_file" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) name = Column(TEXT) hda_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True, nullable=True) lda_id = Column(Integer, ForeignKey("library_dataset_dataset_association.id"), index=True, nullable=True) @@ -9397,7 +9399,7 @@ def _serialize(self, id_encoder, serialization_options): class FormDefinition(Base, Dictifiable, RepresentById): __tablename__ = "form_definition" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) name = Column(TrimmedString(255), nullable=False) @@ -9469,7 +9471,7 @@ def grid_fields(self, grid_index): class FormDefinitionCurrent(Base, RepresentById): __tablename__ = "form_definition_current" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) latest_form_id = Column(Integer, ForeignKey("form_definition.id"), index=True) @@ -9493,7 +9495,7 @@ def __init__(self, form_definition=None): class FormValues(Base, RepresentById): __tablename__ = "form_values" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) form_definition_id = Column(Integer, ForeignKey("form_definition.id"), index=True) @@ -9510,7 +9512,7 @@ def __init__(self, form_def=None, content=None): class UserAddress(Base, RepresentById): __tablename__ = "user_address" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -9547,7 +9549,7 @@ def to_dict(self, trans): class PSAAssociation(Base, AssociationMixin, RepresentById): __tablename__ = "psa_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) server_url = Column(VARCHAR(255)) handle = Column(VARCHAR(255)) secret = Column(VARCHAR(255)) @@ -9597,7 +9599,7 @@ class PSACode(Base, CodeMixin, RepresentById): __tablename__ = "psa_code" __table_args__ = (UniqueConstraint("code", "email"),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) email = Column(VARCHAR(200)) code = Column(VARCHAR(32)) @@ -9622,7 +9624,7 @@ def get_code(cls, code): class PSANonce(Base, NonceMixin, RepresentById): __tablename__ = "psa_nonce" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) server_url = Column(VARCHAR(255)) timestamp = Column(Integer) salt = Column(VARCHAR(40)) @@ -9656,7 +9658,7 @@ def use(cls, server_url, timestamp, salt): class PSAPartial(Base, PartialMixin, RepresentById): __tablename__ = "psa_partial" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) token = Column(VARCHAR(32)) data = Column(TEXT) next_step = Column(Integer) @@ -9694,7 +9696,7 @@ class UserAuthnzToken(Base, UserMixin, RepresentById): __tablename__ = "oidc_user_authnz_tokens" __table_args__ = (UniqueConstraint("provider", "uid"),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) uid = Column(VARCHAR(255)) provider = Column(VARCHAR(32)) @@ -9807,7 +9809,7 @@ class CustosAuthnzToken(Base, RepresentById): UniqueConstraint("external_user_id", "provider"), ) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id")) external_user_id = Column(String(255)) provider = Column(String(255)) @@ -9822,7 +9824,7 @@ class CustosAuthnzToken(Base, RepresentById): class CloudAuthz(Base): __tablename__ = "cloudauthz" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) provider = Column(String(255)) config = Column(MutableJSONType) @@ -9859,7 +9861,7 @@ class Page(Base, HasTags, Dictifiable, RepresentById): __tablename__ = "page" __table_args__ = (Index("ix_page_slug", "slug", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True, nullable=False) @@ -9937,7 +9939,7 @@ def email_hash(self): class PageRevision(Base, Dictifiable, RepresentById): __tablename__ = "page_revision" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) page_id = Column(Integer, ForeignKey("page.id"), index=True, nullable=False) @@ -9961,7 +9963,7 @@ def to_dict(self, view="element"): class PageUserShareAssociation(Base, UserShareAssociation): __tablename__ = "page_user_share_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) page_id = Column(Integer, ForeignKey("page.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) user = relationship("User") @@ -9975,7 +9977,7 @@ class Visualization(Base, HasTags, Dictifiable, RepresentById): Index("ix_visualization_slug", "slug", mysql_length=200), ) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True, nullable=False) @@ -10089,7 +10091,7 @@ class VisualizationRevision(Base, RepresentById): __tablename__ = "visualization_revision" __table_args__ = (Index("ix_visualization_revision_dbkey", "dbkey", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, default=now, onupdate=now) visualization_id = Column(Integer, ForeignKey("visualization.id"), index=True, nullable=False) @@ -10117,7 +10119,7 @@ def copy(self, visualization=None): class VisualizationUserShareAssociation(Base, UserShareAssociation): __tablename__ = "visualization_user_share_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) visualization_id = Column(Integer, ForeignKey("visualization.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) user = relationship("User") @@ -10128,7 +10130,7 @@ class Tag(Base, RepresentById): __tablename__ = "tag" __table_args__ = (UniqueConstraint("name"),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) type = Column(Integer) parent_id = Column(Integer, ForeignKey("tag.id")) name = Column(TrimmedString(255)) @@ -10163,7 +10165,7 @@ def copy(self, cls=None): class HistoryTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "history_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) tag_id = Column(Integer, ForeignKey("tag.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -10177,7 +10179,7 @@ class HistoryTagAssociation(Base, ItemTagAssociation, RepresentById): class HistoryDatasetAssociationTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "history_dataset_association_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_dataset_association_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) tag_id = Column(Integer, ForeignKey("tag.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -10191,7 +10193,7 @@ class HistoryDatasetAssociationTagAssociation(Base, ItemTagAssociation, Represen class LibraryDatasetDatasetAssociationTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "library_dataset_dataset_association_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) library_dataset_dataset_association_id = Column( Integer, ForeignKey("library_dataset_dataset_association.id"), index=True ) @@ -10207,7 +10209,7 @@ class LibraryDatasetDatasetAssociationTagAssociation(Base, ItemTagAssociation, R class PageTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "page_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) page_id = Column(Integer, ForeignKey("page.id"), index=True) tag_id = Column(Integer, ForeignKey("tag.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -10221,7 +10223,7 @@ class PageTagAssociation(Base, ItemTagAssociation, RepresentById): class WorkflowStepTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "workflow_step_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id"), index=True) tag_id = Column(Integer, ForeignKey("tag.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -10235,7 +10237,7 @@ class WorkflowStepTagAssociation(Base, ItemTagAssociation, RepresentById): class StoredWorkflowTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "stored_workflow_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) stored_workflow_id = Column(Integer, ForeignKey("stored_workflow.id"), index=True) tag_id = Column(Integer, ForeignKey("tag.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -10249,7 +10251,7 @@ class StoredWorkflowTagAssociation(Base, ItemTagAssociation, RepresentById): class VisualizationTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "visualization_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) visualization_id = Column(Integer, ForeignKey("visualization.id"), index=True) tag_id = Column(Integer, ForeignKey("tag.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -10263,7 +10265,7 @@ class VisualizationTagAssociation(Base, ItemTagAssociation, RepresentById): class HistoryDatasetCollectionTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "history_dataset_collection_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_dataset_collection_id = Column(Integer, ForeignKey("history_dataset_collection_association.id"), index=True) tag_id = Column(Integer, ForeignKey("tag.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -10277,7 +10279,7 @@ class HistoryDatasetCollectionTagAssociation(Base, ItemTagAssociation, Represent class LibraryDatasetCollectionTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "library_dataset_collection_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) library_dataset_collection_id = Column(Integer, ForeignKey("library_dataset_collection_association.id"), index=True) tag_id = Column(Integer, ForeignKey("tag.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -10291,7 +10293,7 @@ class LibraryDatasetCollectionTagAssociation(Base, ItemTagAssociation, Represent class ToolTagAssociation(Base, ItemTagAssociation, RepresentById): __tablename__ = "tool_tag_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) tool_id = Column(TrimmedString(255), index=True) tag_id = Column(Integer, ForeignKey("tag.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) @@ -10306,7 +10308,7 @@ class HistoryAnnotationAssociation(Base, RepresentById): __tablename__ = "history_annotation_association" __table_args__ = (Index("ix_history_anno_assoc_annotation", "annotation", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) annotation = Column(TEXT) @@ -10318,7 +10320,7 @@ class HistoryDatasetAssociationAnnotationAssociation(Base, RepresentById): __tablename__ = "history_dataset_association_annotation_association" __table_args__ = (Index("ix_history_dataset_anno_assoc_annotation", "annotation", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_dataset_association_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) annotation = Column(TEXT) @@ -10330,7 +10332,7 @@ class StoredWorkflowAnnotationAssociation(Base, RepresentById): __tablename__ = "stored_workflow_annotation_association" __table_args__ = (Index("ix_stored_workflow_ann_assoc_annotation", "annotation", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) stored_workflow_id = Column(Integer, ForeignKey("stored_workflow.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) annotation = Column(TEXT) @@ -10342,7 +10344,7 @@ class WorkflowStepAnnotationAssociation(Base, RepresentById): __tablename__ = "workflow_step_annotation_association" __table_args__ = (Index("ix_workflow_step_ann_assoc_annotation", "annotation", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) workflow_step_id = Column(Integer, ForeignKey("workflow_step.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) annotation = Column(TEXT) @@ -10354,7 +10356,7 @@ class PageAnnotationAssociation(Base, RepresentById): __tablename__ = "page_annotation_association" __table_args__ = (Index("ix_page_annotation_association_annotation", "annotation", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) page_id = Column(Integer, ForeignKey("page.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) annotation = Column(TEXT) @@ -10366,7 +10368,7 @@ class VisualizationAnnotationAssociation(Base, RepresentById): __tablename__ = "visualization_annotation_association" __table_args__ = (Index("ix_visualization_annotation_association_annotation", "annotation", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) visualization_id = Column(Integer, ForeignKey("visualization.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) annotation = Column(TEXT) @@ -10377,7 +10379,7 @@ class VisualizationAnnotationAssociation(Base, RepresentById): class HistoryDatasetCollectionAssociationAnnotationAssociation(Base, RepresentById): __tablename__ = "history_dataset_collection_annotation_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_dataset_collection_id = Column(Integer, ForeignKey("history_dataset_collection_association.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) annotation = Column(TEXT) @@ -10388,7 +10390,7 @@ class HistoryDatasetCollectionAssociationAnnotationAssociation(Base, RepresentBy class LibraryDatasetCollectionAnnotationAssociation(Base, RepresentById): __tablename__ = "library_dataset_collection_annotation_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) library_dataset_collection_id = Column(Integer, ForeignKey("library_dataset_collection_association.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) annotation = Column(TEXT) @@ -10425,7 +10427,7 @@ def _set_item(self, item): class HistoryRatingAssociation(ItemRatingAssociation, RepresentById): __tablename__ = "history_rating_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) rating = Column(Integer, index=True) @@ -10440,7 +10442,7 @@ def _set_item(self, history): class HistoryDatasetAssociationRatingAssociation(ItemRatingAssociation, RepresentById): __tablename__ = "history_dataset_association_rating_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_dataset_association_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) rating = Column(Integer, index=True) @@ -10455,7 +10457,7 @@ def _set_item(self, history_dataset_association): class StoredWorkflowRatingAssociation(ItemRatingAssociation, RepresentById): __tablename__ = "stored_workflow_rating_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) stored_workflow_id = Column(Integer, ForeignKey("stored_workflow.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) rating = Column(Integer, index=True) @@ -10470,7 +10472,7 @@ def _set_item(self, stored_workflow): class PageRatingAssociation(ItemRatingAssociation, RepresentById): __tablename__ = "page_rating_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) page_id = Column(Integer, ForeignKey("page.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) rating = Column(Integer, index=True) @@ -10485,7 +10487,7 @@ def _set_item(self, page): class VisualizationRatingAssociation(ItemRatingAssociation, RepresentById): __tablename__ = "visualization_rating_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) visualization_id = Column(Integer, ForeignKey("visualization.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) rating = Column(Integer, index=True) @@ -10500,7 +10502,7 @@ def _set_item(self, visualization): class HistoryDatasetCollectionRatingAssociation(ItemRatingAssociation, RepresentById): __tablename__ = "history_dataset_collection_rating_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) history_dataset_collection_id = Column(Integer, ForeignKey("history_dataset_collection_association.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) rating = Column(Integer, index=True) @@ -10515,7 +10517,7 @@ def _set_item(self, dataset_collection): class LibraryDatasetCollectionRatingAssociation(ItemRatingAssociation, RepresentById): __tablename__ = "library_dataset_collection_rating_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) library_dataset_collection_id = Column(Integer, ForeignKey("library_dataset_collection_association.id"), index=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) rating = Column(Integer, index=True) @@ -10531,7 +10533,7 @@ def _set_item(self, dataset_collection): class DataManagerHistoryAssociation(Base, RepresentById): __tablename__ = "data_manager_history_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, index=True, default=now, onupdate=now) history_id = Column(Integer, ForeignKey("history.id"), index=True) @@ -10544,7 +10546,7 @@ class DataManagerJobAssociation(Base, RepresentById): __tablename__ = "data_manager_job_association" __table_args__ = (Index("ix_data_manager_job_association_data_manager_id", "data_manager_id", mysql_length=200),) - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) update_time = Column(DateTime, index=True, default=now, onupdate=now) job_id = Column(Integer, ForeignKey("job.id"), index=True) @@ -10555,7 +10557,7 @@ class DataManagerJobAssociation(Base, RepresentById): class UserPreference(Base, RepresentById): __tablename__ = "user_preference" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) name = Column(Unicode(255), index=True) value = Column(Text) @@ -10570,7 +10572,7 @@ def __init__(self, name=None, value=None): class UserAction(Base, RepresentById): __tablename__ = "user_action" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) session_id = Column(Integer, ForeignKey("galaxy_session.id"), index=True) @@ -10583,7 +10585,7 @@ class UserAction(Base, RepresentById): class APIKeys(Base, RepresentById): __tablename__ = "api_keys" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) user_id = Column(Integer, ForeignKey("galaxy_user.id"), index=True) key = Column(TrimmedString(32), index=True, unique=True) @@ -10621,7 +10623,7 @@ def _prepare_metadata_for_serialization(id_encoder, serialization_options, metad class CleanupEvent(Base): __tablename__ = "cleanup_event" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) message = Column(TrimmedString(1024)) @@ -10629,7 +10631,7 @@ class CleanupEvent(Base): class CleanupEventDatasetAssociation(Base): __tablename__ = "cleanup_event_dataset_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) cleanup_event_id = Column(Integer, ForeignKey("cleanup_event.id"), index=True, nullable=True) dataset_id = Column(Integer, ForeignKey("dataset.id"), index=True) @@ -10638,7 +10640,7 @@ class CleanupEventDatasetAssociation(Base): class CleanupEventMetadataFileAssociation(Base): __tablename__ = "cleanup_event_metadata_file_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) cleanup_event_id = Column(Integer, ForeignKey("cleanup_event.id"), index=True, nullable=True) metadata_file_id = Column(Integer, ForeignKey("metadata_file.id"), index=True) @@ -10647,7 +10649,7 @@ class CleanupEventMetadataFileAssociation(Base): class CleanupEventHistoryAssociation(Base): __tablename__ = "cleanup_event_history_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) cleanup_event_id = Column(Integer, ForeignKey("cleanup_event.id"), index=True, nullable=True) history_id = Column(Integer, ForeignKey("history.id"), index=True) @@ -10656,7 +10658,7 @@ class CleanupEventHistoryAssociation(Base): class CleanupEventHistoryDatasetAssociationAssociation(Base): __tablename__ = "cleanup_event_hda_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) cleanup_event_id = Column(Integer, ForeignKey("cleanup_event.id"), index=True, nullable=True) hda_id = Column(Integer, ForeignKey("history_dataset_association.id"), index=True) @@ -10665,7 +10667,7 @@ class CleanupEventHistoryDatasetAssociationAssociation(Base): class CleanupEventLibraryAssociation(Base): __tablename__ = "cleanup_event_library_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) cleanup_event_id = Column(Integer, ForeignKey("cleanup_event.id"), index=True, nullable=True) library_id = Column(Integer, ForeignKey("library.id"), index=True) @@ -10674,7 +10676,7 @@ class CleanupEventLibraryAssociation(Base): class CleanupEventLibraryFolderAssociation(Base): __tablename__ = "cleanup_event_library_folder_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) cleanup_event_id = Column(Integer, ForeignKey("cleanup_event.id"), index=True, nullable=True) library_folder_id = Column(Integer, ForeignKey("library_folder.id"), index=True) @@ -10683,7 +10685,7 @@ class CleanupEventLibraryFolderAssociation(Base): class CleanupEventLibraryDatasetAssociation(Base): __tablename__ = "cleanup_event_library_dataset_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) cleanup_event_id = Column(Integer, ForeignKey("cleanup_event.id"), index=True, nullable=True) library_dataset_id = Column(Integer, ForeignKey("library_dataset.id"), index=True) @@ -10692,7 +10694,7 @@ class CleanupEventLibraryDatasetAssociation(Base): class CleanupEventLibraryDatasetDatasetAssociationAssociation(Base): __tablename__ = "cleanup_event_ldda_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) cleanup_event_id = Column(Integer, ForeignKey("cleanup_event.id"), index=True, nullable=True) ldda_id = Column(Integer, ForeignKey("library_dataset_dataset_association.id"), index=True) @@ -10701,7 +10703,7 @@ class CleanupEventLibraryDatasetDatasetAssociationAssociation(Base): class CleanupEventImplicitlyConvertedDatasetAssociationAssociation(Base): __tablename__ = "cleanup_event_icda_association" - id = Column(Integer, primary_key=True) + id: Mapped[int] = mapped_column(Integer, primary_key=True) create_time = Column(DateTime, default=now) cleanup_event_id = Column(Integer, ForeignKey("cleanup_event.id"), index=True, nullable=True) icda_id = Column(Integer, ForeignKey("implicitly_converted_dataset_association.id"), index=True)