Remove MigrateTools from model and mapping (note)

This class is not referenced in the codebase. The table has limited use,
but not through the model, so, I think, it shouldn't be part of the
model. The table is part of our SQLAlchemy Migrate setup, which is being
replaced with Alembic.
This commit is contained in:
Sergey Golitsynskiy
2021-10-20 12:37:22 -04:00
parent 29e1885975
commit 8f79a8fc46
2 changed files with 0 additions and 13 deletions
@@ -596,11 +596,3 @@ class ToolVersionAssociation(_HasTable):
self.id = id
self.tool_id = tool_id
self.parent_id = parent_id
class MigrateTools(_HasTable):
def __init__(self, repository_id=None, repository_path=None, version=None):
self.repository_id = repository_id
self.repository_path = repository_path
self.version = version
@@ -78,11 +78,6 @@ install_model.ToolVersionAssociation.table = Table("tool_version_association", m
Column("tool_id", Integer, ForeignKey("tool_version.id"), index=True, nullable=False),
Column("parent_id", Integer, ForeignKey("tool_version.id"), index=True, nullable=False))
install_model.MigrateTools.table = Table("migrate_tools", metadata,
Column("repository_id", TrimmedString(255)),
Column("repository_path", TEXT),
Column("version", Integer))
mapper_registry.map_imperatively(install_model.ToolShedRepository, install_model.ToolShedRepository.table,
properties=dict(tool_versions=relation(install_model.ToolVersion,
primaryjoin=(install_model.ToolShedRepository.table.c.id == install_model.ToolVersion.table.c.tool_shed_repository_id),