Skip to content

Commit

Permalink
refactor: rename deployment and operation tables
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulFarault committed Nov 2, 2023
1 parent 4b2a1f5 commit f4bf96c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tdp/core/models/deployment_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class DeploymentLog(Base):
Hold past and current deployment information.
"""

__tablename__ = "deployment_log"
__tablename__ = "deployment"

id: Mapped[int] = mapped_column(primary_key=True, doc="Deployment log id.")
options: Mapped[Optional[dict]] = mapped_column(
Expand Down
4 changes: 2 additions & 2 deletions tdp/core/models/operation_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ class OperationLog(Base):
Hold past and current operation information linked to a deployment.
"""

__tablename__ = "operation_log"
__tablename__ = "operation"

deployment_id: Mapped[int] = mapped_column(
ForeignKey("deployment_log.id"), primary_key=True, doc="Deployment log id."
ForeignKey("deployment.id"), primary_key=True, doc="Deployment log id."
)
operation_order: Mapped[int] = mapped_column(
primary_key=True, doc="Operation order."
Expand Down
2 changes: 1 addition & 1 deletion tdp/core/models/sch_status_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SCHStatusLog(Base):
doc="Source of the status log.",
)
deployment_id: Mapped[Optional[int]] = mapped_column(
ForeignKey("deployment_log.id"),
ForeignKey("deployment.id"),
doc="Related deployment log id (if applicable).",
)
message: Mapped[Optional[str]] = mapped_column(
Expand Down

0 comments on commit f4bf96c

Please sign in to comment.