Skip to content

Commit

Permalink
🔨 add field definition for new generated md5 column on chart_configs
Browse files Browse the repository at this point in the history
  • Loading branch information
danyx23 committed Sep 9, 2024
1 parent 2957843 commit 3e42647
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions etl/grapher_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class ChartConfig(Base):
id: Mapped[bytes] = mapped_column(CHAR(36), primary_key=True)
patch: Mapped[dict] = mapped_column(JSON, nullable=False)
full: Mapped[dict] = mapped_column(JSON, nullable=False)
fullMd5: Mapped[str] = mapped_column(CHAR(24), Computed("(to_base64(unhex(md5(full))))", persisted=True))
slug: Mapped[Optional[str]] = mapped_column(
String(255), Computed("(json_unquote(json_extract(`full`, '$.slug')))", persisted=True)
)
Expand Down

0 comments on commit 3e42647

Please sign in to comment.