Skip to content
Discussion options

You must be logged in to vote

[Bug/Migration] : "table detections has no column named recording_id" even after update

Hi! I ran into an issue after updating my LightNVR Docker container.

The Problem: My recordings were failing to link to detections, and playback in the web UI was broken. The logs showed repeated errors: [ERROR] Failed to prepare statement: table detections has no column named recording_id.

However, the startup logs claimed the database was fine: [INFO] Database schema is up to date (version 16)

The Fix: I had to manually access the database via sqlite3 and run: ALTER TABLE detections ADD COLUMN recording_id INTEGER;

Note: I am using a persistent volume for /var/lib/lightnvr/data. It seems the migratio…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@matteius
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@matteius
Comment options

Answer selected by matteius
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants