Skip to content

Commit

Permalink
URSA-255 > Add ix_time_summary_id and ix_data_summary_id indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
Elena Henderson committed Mar 16, 2021
1 parent 266c3f3 commit 0953e26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conbench/entities/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ class Data(Base, EntityMixin):
summary_id = NotNull(s.String(50), s.ForeignKey("summary.id", ondelete="CASCADE"))
iteration = NotNull(s.Integer, check("iteration>=1"))
result = NotNull(s.Numeric, check("result>=0"))


s.Index("ix_data_summary_id", Data.summary_id)
3 changes: 3 additions & 0 deletions conbench/entities/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ class Time(Base, EntityMixin):
summary_id = NotNull(s.String(50), s.ForeignKey("summary.id", ondelete="CASCADE"))
iteration = NotNull(s.Integer, check("iteration>=1"))
result = NotNull(s.Numeric, check("result>=0"))


s.Index("ix_time_summary_id", Time.summary_id)

0 comments on commit 0953e26

Please sign in to comment.