Add default

This commit is contained in:
Nick Mowen 2022-09-25 08:36:06 -06:00
parent 4f41e7df86
commit a50534ebc6
2 changed files with 2 additions and 2 deletions

View File

@ -41,4 +41,4 @@ class Recordings(Model): # type: ignore[misc]
duration = FloatField() duration = FloatField()
motion = IntegerField(null=True) motion = IntegerField(null=True)
objects = IntegerField(null=True) objects = IntegerField(null=True)
segment_size = FloatField() # this should be stored as MB segment_size = FloatField(default=0) # this should be stored as MB

View File

@ -38,7 +38,7 @@ SQL = pw.SQL
def migrate(migrator, database, fake=False, **kwargs): def migrate(migrator, database, fake=False, **kwargs):
migrator.add_fields( migrator.add_fields(
Recordings, Recordings,
segment_size=pw.FloatField(), segment_size=pw.FloatField(default=0),
) )