summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-02-05 03:01:58 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-02-05 03:02:01 +0300
commit4e5f302958000f3f5623b3d8d82744e5f36db855 (patch)
treec8a773b3fcfa4ebe2069616a02d4c850411cfebd
parent7605ec06d80890e4f7b95db005dfd0db27b69048 (diff)
ipcam_server: sqlite fix
-rwxr-xr-xsrc/ipcam_server.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ipcam_server.py b/src/ipcam_server.py
index f15363e..bf796dd 100755
--- a/src/ipcam_server.py
+++ b/src/ipcam_server.py
@@ -79,7 +79,7 @@ class IPCamServerDatabase(SQLiteBase):
cursor.execute("ALTER TABLE motion_failures ADD COLUMN message TEXT NOT NULL DEFAULT ''")
if version < 4:
- cursor.execute("ALTER TABLE timestamps ADD COLUMN motion_start_time INTEGER NOT NULL")
+ cursor.execute("ALTER TABLE timestamps ADD COLUMN motion_start_time INTEGER NOT NULL DEFAULT 0")
cursor.execute("UPDATE timestamps SET motion_start_time=motion_time")
self.commit()