Skip to content

Commit e83b77a

Browse files
committed
added an Interval column to the example schema in the playground
1 parent d0d7a59 commit e83b77a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

piccolo/apps/playground/commands/run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Varchar,
1313
ForeignKey,
1414
Integer,
15+
Interval,
1516
Numeric,
1617
Timestamp,
1718
UUID,
@@ -40,6 +41,7 @@ class Concert(Table):
4041
band_2 = ForeignKey(Band)
4142
venue = ForeignKey(Venue)
4243
starts = Timestamp()
44+
duration = Interval()
4345

4446

4547
class Ticket(Table):
@@ -91,6 +93,7 @@ def populate():
9193
band_2=rustaceans.id,
9294
venue=venue.id,
9395
starts=datetime.datetime.now() + datetime.timedelta(days=7),
96+
duration=datetime.timedelta(hours=2),
9497
)
9598
concert.save().run_sync()
9699

piccolo/columns/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
Float,
55
ForeignKey,
66
Integer,
7+
Interval,
78
Numeric,
89
PrimaryKey,
910
Real,

0 commit comments

Comments
 (0)