NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Update peewee-migrate to 0.14.x (#21243)
Martin Weineltdde02cadb216
diff --git a/docker/main/requirements-wheels.txt b/docker/main/requirements-wheels.txtindex 2d216d386c..1a1043b19c 100644--- a/docker/main/requirements-wheels.txt+++ b/docker/main/requirements-wheels.txt@@ -21,7 +21,7 @@ onvif-zeep-async == 4.0.*paho-mqtt == 2.1.*pandas == 2.2.*peewee == 3.17.*-peewee_migrate == 1.13.*+peewee_migrate == 1.14.*psutil == 7.1.*pydantic == 2.10.*git+https://github.com/fbcotter/py3nvml#egg=py3nvmldiff --git a/migrations/001_create_events_table.py b/migrations/001_create_events_table.pyindex 9e8ad1b607..57f9aa6786 100644--- a/migrations/001_create_events_table.py+++ b/migrations/001_create_events_table.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/002_add_clip_snapshot.py b/migrations/002_add_clip_snapshot.pyindex 1431c9c85f..47a46f5728 100644--- a/migrations/002_add_clip_snapshot.py+++ b/migrations/002_add_clip_snapshot.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/003_create_recordings_table.py b/migrations/003_create_recordings_table.pyindex 77f9827cf0..3956ae929b 100644--- a/migrations/003_create_recordings_table.py+++ b/migrations/003_create_recordings_table.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/004_add_bbox_region_area.py b/migrations/004_add_bbox_region_area.pyindex da4ca7ac81..a1aa35aab2 100644--- a/migrations/004_add_bbox_region_area.py+++ b/migrations/004_add_bbox_region_area.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/005_make_end_time_nullable.py b/migrations/005_make_end_time_nullable.pyindex 87d0e3fd45..d80d31d881 100644--- a/migrations/005_make_end_time_nullable.py+++ b/migrations/005_make_end_time_nullable.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/006_add_motion_active_objects.py b/migrations/006_add_motion_active_objects.pyindex 6ab67ee3a7..2fe1f908ad 100644--- a/migrations/006_add_motion_active_objects.py+++ b/migrations/006_add_motion_active_objects.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/007_add_retain_indefinitely.py b/migrations/007_add_retain_indefinitely.pyindex cb5f9da920..e5d07ab7af 100644--- a/migrations/007_add_retain_indefinitely.py+++ b/migrations/007_add_retain_indefinitely.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/008_add_sub_label.py b/migrations/008_add_sub_label.pyindex 56c4bb75ad..bba38343a5 100644--- a/migrations/008_add_sub_label.py+++ b/migrations/008_add_sub_label.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/009_add_object_filter_ratio.py b/migrations/009_add_object_filter_ratio.pyindex e5a00683de..77a25ebab4 100644--- a/migrations/009_add_object_filter_ratio.py+++ b/migrations/009_add_object_filter_ratio.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/010_add_plus_image_id.py b/migrations/010_add_plus_image_id.pyindex 6b8c7ccc61..d403dbb717 100644--- a/migrations/010_add_plus_image_id.py+++ b/migrations/010_add_plus_image_id.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/011_update_indexes.py b/migrations/011_update_indexes.pyindex 5c13baa540..6d411d3df3 100644--- a/migrations/011_update_indexes.py+++ b/migrations/011_update_indexes.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/012_add_segment_size.py b/migrations/012_add_segment_size.pyindex 7a1c797362..8ea91a1263 100644--- a/migrations/012_add_segment_size.py+++ b/migrations/012_add_segment_size.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/013_create_timeline_table.py b/migrations/013_create_timeline_table.pyindex 7a83d96c72..9ed2606212 100644--- a/migrations/013_create_timeline_table.py+++ b/migrations/013_create_timeline_table.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/014_event_updates_for_fp.py b/migrations/014_event_updates_for_fp.pyindex caa609bfaf..f44f6c93be 100644--- a/migrations/014_event_updates_for_fp.py+++ b/migrations/014_event_updates_for_fp.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/015_event_refactor.py b/migrations/015_event_refactor.pyindex 1bcb9c510e..92d8a165ed 100644--- a/migrations/015_event_refactor.py+++ b/migrations/015_event_refactor.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/016_sublabel_increase.py b/migrations/016_sublabel_increase.pyindex 536ea0a610..66411ffaef 100644--- a/migrations/016_sublabel_increase.py+++ b/migrations/016_sublabel_increase.py@@ -4,8 +4,8 @@ from frigate.models import Eventdef migrate(migrator, database, fake=False, **kwargs):- migrator.change_columns(Event, sub_label=pw.CharField(max_length=100, null=True))+ migrator.change_fields(Event, sub_label=pw.CharField(max_length=100, null=True))def rollback(migrator, database, fake=False, **kwargs):- migrator.change_columns(Event, sub_label=pw.CharField(max_length=20, null=True))+ migrator.change_fields(Event, sub_label=pw.CharField(max_length=20, null=True))diff --git a/migrations/017_update_indexes.py b/migrations/017_update_indexes.pyindex 66d1fcc6a1..63685eaf72 100644--- a/migrations/017_update_indexes.py+++ b/migrations/017_update_indexes.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/018_add_dbfs.py b/migrations/018_add_dbfs.pyindex 5b5c56b9d1..485e954e31 100644--- a/migrations/018_add_dbfs.py+++ b/migrations/018_add_dbfs.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/019_create_regions_table.py b/migrations/019_create_regions_table.pyindex 2900b78d24..961aaf81d9 100644--- a/migrations/019_create_regions_table.py+++ b/migrations/019_create_regions_table.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/020_update_index_recordings.py b/migrations/020_update_index_recordings.pyindex 7d0c2b8600..d6af71c7ca 100644--- a/migrations/020_update_index_recordings.py+++ b/migrations/020_update_index_recordings.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/021_create_previews_table.py b/migrations/021_create_previews_table.pyindex 1036e7cddd..b775360990 100644--- a/migrations/021_create_previews_table.py+++ b/migrations/021_create_previews_table.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/022_create_review_segment_table.py b/migrations/022_create_review_segment_table.pyindex 681795e37b..91d0c8c6bb 100644--- a/migrations/022_create_review_segment_table.py+++ b/migrations/022_create_review_segment_table.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/023_add_regions.py b/migrations/023_add_regions.pyindex 17d93962a9..7649baa14c 100644--- a/migrations/023_add_regions.py+++ b/migrations/023_add_regions.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/024_create_export_table.py b/migrations/024_create_export_table.pyindex 414bd712ee..8de2f17d4a 100644--- a/migrations/024_create_export_table.py+++ b/migrations/024_create_export_table.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/025_create_user_table.py b/migrations/025_create_user_table.pyindex 6b971a6f11..dec57d66f0 100644--- a/migrations/025_create_user_table.py+++ b/migrations/025_create_user_table.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/026_add_notification_tokens.py b/migrations/026_add_notification_tokens.pyindex 37506c4063..23860c58fb 100644--- a/migrations/026_add_notification_tokens.py+++ b/migrations/026_add_notification_tokens.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/027_create_explore_index.py b/migrations/027_create_explore_index.pyindex 6d0012c6ce..f08c0bbc97 100644--- a/migrations/027_create_explore_index.py+++ b/migrations/027_create_explore_index.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/028_optional_event_thumbnail.py b/migrations/028_optional_event_thumbnail.pyindex 3e36a28ccd..52177004ba 100644--- a/migrations/028_optional_event_thumbnail.py+++ b/migrations/028_optional_event_thumbnail.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/029_add_user_role.py b/migrations/029_add_user_role.pyindex 484e0c5487..e0fb1bb16e 100644--- a/migrations/029_add_user_role.py+++ b/migrations/029_add_user_role.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/030_create_user_review_status.py b/migrations/030_create_user_review_status.pyindex 38937f7f93..ddcf063ec7 100644--- a/migrations/030_create_user_review_status.py+++ b/migrations/030_create_user_review_status.py@@ -8,7 +8,7 @@ Some examples (model - class or model_name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a model@@ -76,7 +76,7 @@ def migrate(migrator, database, fake=False, **kwargs):)if not fake: # Only run data migration if not faking- migrator.python(migrate_data)+ migrator.run(migrate_data)migrator.sql('ALTER TABLE "reviewsegment" DROP COLUMN "has_been_reviewed"')diff --git a/migrations/031_create_trigger_table.py b/migrations/031_create_trigger_table.pyindex 7c8c289cc2..c2ac2e026a 100644--- a/migrations/031_create_trigger_table.py+++ b/migrations/031_create_trigger_table.py@@ -6,7 +6,7 @@ Some examples (model - class or model_name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a modeldiff --git a/migrations/032_add_password_changed_at.py b/migrations/032_add_password_changed_at.pyindex eedb3ab2da..5382c12e2a 100644--- a/migrations/032_add_password_changed_at.py+++ b/migrations/032_add_password_changed_at.py@@ -5,7 +5,7 @@ Some examples (model - class or model name)::> Model = migrator.orm['model_name'] # Return model in current state by name> migrator.sql(sql) # Run custom SQL- > migrator.python(func, *args, **kwargs) # Run python code+ > migrator.run(func, *args, **kwargs) # Run python code> migrator.create_model(Model) # Create a model (could be used as decorator)> migrator.remove_model(model, cascade=True) # Remove a model> migrator.add_fields(model, **fields) # Add fields to a model