Skip to content

Commit

Permalink
🗃️ Remove version field from pipeline table (#9)
Browse files Browse the repository at this point in the history
* 🗃️ removed version from pipeline schema

* 🗃️ changed the pipeline table name to pipeline_run
  • Loading branch information
bpenteado authored Aug 18, 2022
1 parent 458405b commit b01e7bd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lndb_schema_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
dtransform_in
dtransform_out
jupynb
pipeline
pipeline_run
usage
version_yvzi
Expand All @@ -39,7 +39,7 @@
dtransform_in,
dtransform_out,
jupynb,
pipeline,
pipeline_run,
usage,
usage_type,
user,
Expand Down
15 changes: 5 additions & 10 deletions lndb_schema_core/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,13 @@ class dtransform(SQLModel, table=True): # type: ignore
["jupynb.id", "jupynb.v"],
name="dtransform_jupynb",
),
ForeignKeyConstraint(
["pipeline_id", "pipeline_v"],
["pipeline.id", "pipeline.v"],
name="dtransform_pipeline",
),
)
id: str = Field(default_factory=id_dtransform, primary_key=True)
jupynb_id: Union[str, None] = None
jupynb_v: Union[str, None] = None
pipeline_id: Union[str, None] = None
pipeline_v: Union[str, None] = None
pipeline_run_id: Union[str, None] = Field(
default=None, foreign_key="pipeline_run.id"
)


class dtransform_in(SQLModel, table=True): # type: ignore
Expand Down Expand Up @@ -118,11 +114,10 @@ class jupynb(SQLModel, table=True): # type: ignore
time_updated: datetime = Field(default_factory=utcnow, nullable=False)


class pipeline(SQLModel, table=True): # type: ignore
"""Pipelines."""
class pipeline_run(SQLModel, table=True): # type: ignore
"""Pipeline runs."""

id: str = Field(default=None, primary_key=True)
v: str = Field(default=None, primary_key=True)


# ----------
Expand Down

0 comments on commit b01e7bd

Please sign in to comment.