From 03748503670991b3c54f93adaa21339f0fab4e7f Mon Sep 17 00:00:00 2001 From: Thibaut Voirand Date: Fri, 6 Dec 2024 10:15:50 +0100 Subject: [PATCH] Add scripts_metadata table to SQL DB --- scripts/createdb.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/createdb.sh b/scripts/createdb.sh index 4c66ff383..5e715ef3a 100755 --- a/scripts/createdb.sh +++ b/scripts/createdb.sh @@ -17,6 +17,10 @@ CREATE TABLE IF NOT EXISTS detections ( File_Name VARCHAR(100) NOT NULL); CREATE INDEX "detections_Com_Name" ON "detections" ("Com_Name"); CREATE INDEX "detections_Date_Time" ON "detections" ("Date" DESC, "Time" DESC); +DROP TABLE IF EXISTS scripts_metadata; +CREATE TABLE IF NOT EXISTS scripts_metadata ( + script_name TEXT PRIMARY KEY, + last_run DATETIME); EOF chown $USER:$USER $HOME/BirdNET-Pi/scripts/birds.db chmod g+w $HOME/BirdNET-Pi/scripts/birds.db