mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
Fix migration
- Ensure that defaults match between Event and migration script - Deconflict migration script number (from rebase) Issue: #2948
This commit is contained in:
parent
2f4169dbff
commit
fd6db32b38
@ -19,7 +19,7 @@ class Event(Model):
|
|||||||
box = JSONField()
|
box = JSONField()
|
||||||
area = IntegerField()
|
area = IntegerField()
|
||||||
retain_indefinitely = BooleanField(default=False)
|
retain_indefinitely = BooleanField(default=False)
|
||||||
ratio = FloatField()
|
ratio = FloatField(default=1.0)
|
||||||
|
|
||||||
|
|
||||||
class Recordings(Model):
|
class Recordings(Model):
|
||||||
|
|||||||
@ -30,9 +30,7 @@ SQL = pw.SQL
|
|||||||
def migrate(migrator, database, fake=False, **kwargs):
|
def migrate(migrator, database, fake=False, **kwargs):
|
||||||
migrator.add_fields(
|
migrator.add_fields(
|
||||||
Event,
|
Event,
|
||||||
ratio=pw.FloatField(
|
ratio=pw.FloatField(default=1.0), # Assume that existing detections are square
|
||||||
default=1.0
|
|
||||||
), # There is no way to get the true ratio from an existing recording, so simply assume they are square.
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user