From 4d83179e77556acae576d37a6bd256d405407b83 Mon Sep 17 00:00:00 2001 From: George Tsiamasiotis Date: Sun, 29 Sep 2024 00:34:14 +0300 Subject: [PATCH] Do not migrate db to new config path I just saw this, and I would be very surprised by that behaviour as a user. Changing the db path would randomly move the database, and changing it back (or to anything, really) would not. These kinds of advanced settings are generally expected to do one thing: Change the path frigate opens the database from. The end. --- frigate/app.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/frigate/app.py b/frigate/app.py index 157b96831..e328b4f37 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -32,7 +32,6 @@ from frigate.const import ( CACHE_DIR, CLIPS_DIR, CONFIG_DIR, - DEFAULT_DB_PATH, EXPORT_DIR, MODEL_CACHE_DIR, RECORD_DIR, @@ -133,13 +132,6 @@ class FrigateApp: except PermissionError: logger.error("Unable to write to /config to save DB state") - # Migrate DB location - old_db_path = DEFAULT_DB_PATH - if not os.path.isfile(self.config.database.path) and os.path.isfile( - old_db_path - ): - os.rename(old_db_path, self.config.database.path) - # Migrate DB schema migrate_db = SqliteExtDatabase(self.config.database.path)