diff --git a/db_schema.sql b/db_schema.sql
index c66eb86892ed3a4fb963ed0d2299965bf0e16b22..f85b8c52f9fbf3a01d526c64c5b2c6707beaafd3 100644
--- a/db_schema.sql
+++ b/db_schema.sql
@@ -128,6 +128,7 @@ CREATE TABLE IF NOT EXISTS `log` (
 	`ip` varchar(64),
 	`id` varchar(64),
 	`time` datetime NOT NULL,
+	`source` varchar(8),
 	`object` varchar(10),
 	`obj_id` INTEGER,
 	`path` varchar(255) NOT NULL
diff --git a/server.py b/server.py
index f5acc7353e028c36a0244ddca93e72a96b8e1f81..9bd4889de8be74b8807fee1fdeaacc21a7c86c75 100644
--- a/server.py
+++ b/server.py
@@ -552,7 +552,7 @@ def auth(): # For use with nginx auth_request
 		password = auth.password
 	if checkperm(perms, username=username, password=password):
 		try:
-			modify('INSERT INTO log VALUES (?, ?, ?, "video", ?, ?)', ip, cookie, datetime.now(), perms[0]['vid'], url)
+			modify('INSERT INTO log (ip, id, `time`, object, obj_id, path) VALUES (?, ?, ?, "video", ?, ?)', ip, cookie, datetime.now(), perms[0]['vid'], url)
 		except:
 			pass
 		r = make_response('OK', 200)