mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 11:45:24 +03:00
Feedback + check fix
This commit is contained in:
parent
f493fdea1d
commit
b41faa9628
@ -990,7 +990,7 @@ def events():
|
|||||||
if time_range != DEFAULT_TIME_RANGE:
|
if time_range != DEFAULT_TIME_RANGE:
|
||||||
# get timezone arg to ensure browser times are used
|
# get timezone arg to ensure browser times are used
|
||||||
tz_name = request.args.get("timezone", default="utc", type=str)
|
tz_name = request.args.get("timezone", default="utc", type=str)
|
||||||
hour_modifier, minute_modifier, seconds_offset = get_tz_modifiers(tz_name)
|
hour_modifier, minute_modifier, _ = get_tz_modifiers(tz_name)
|
||||||
|
|
||||||
times = time_range.split(",")
|
times = time_range.split(",")
|
||||||
time_after = times[0]
|
time_after = times[0]
|
||||||
|
|||||||
@ -26,18 +26,14 @@ SQL = pw.SQL
|
|||||||
|
|
||||||
|
|
||||||
def migrate(migrator, database, fake=False, **kwargs):
|
def migrate(migrator, database, fake=False, **kwargs):
|
||||||
migrator.sql(
|
migrator.sql('DROP INDEX recordings_end_time_start_time')
|
||||||
'DROP INDEX recordings_end_time_start_time'
|
|
||||||
)
|
|
||||||
migrator.sql(
|
migrator.sql(
|
||||||
'CREATE INDEX "recordings_camera_start_time_end_time" ON "recordings" ("camera", "start_time" DESC, "end_time" DESC)'
|
'CREATE INDEX "recordings_camera_start_time_end_time" ON "recordings" ("camera", "start_time" DESC, "end_time" DESC)'
|
||||||
)
|
)
|
||||||
migrator.sql(
|
migrator.sql(
|
||||||
'CREATE INDEX "recordings_api_recordings_summary" ON "recordings" ("camera", "start_time" DESC, "duration", "motion", "objects")'
|
'CREATE INDEX "recordings_api_recordings_summary" ON "recordings" ("camera", "start_time" DESC, "duration", "motion", "objects")'
|
||||||
)
|
)
|
||||||
migrator.sql(
|
migrator.sql('CREATE INDEX "recordings_start_time" ON "recordings" ("start_time")')
|
||||||
'CREATE INDEX "recordings_start_time" ON "recordings" ("start_time")'
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def rollback(migrator, database, fake=False, **kwargs):
|
def rollback(migrator, database, fake=False, **kwargs):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user