fix migrations
All checks were successful
/ release (push) Successful in 42s

This commit is contained in:
speatzle 2025-03-19 13:32:37 +01:00
parent 1af3a3d5b9
commit fa1deed55a
3 changed files with 4 additions and 5 deletions

View file

@ -1,4 +1,4 @@
ALTER TABLE tasks
ALTER TABLE files
DROP IF EXISTS old_md5,
DROP IF EXISTS old_ffprobe_data,
DROP IF EXISTS old_size bigint;
DROP IF EXISTS old_size;

View file

@ -1,4 +1,3 @@
ALTER TABLE libraries
ADD old_md5 uuid,
ALTER TABLE files ADD old_md5 uuid,
ADD old_ffprobe_data JSONB,
ADD old_size bigint;

View file

@ -65,7 +65,7 @@ func handleLibrary(w http.ResponseWriter, r *http.Request) {
Enable: enabled,
}
rows, err := db.Query(r.Context(), "SELECT id, path, size, status, health, transcode, md5, updated_at FROM files where library_id = $1", id)
rows, err := db.Query(r.Context(), "SELECT id, path, size, old_size, status, health, transcode, md5, old_md5, updated_at FROM files where library_id = $1", id)
if err != nil {
slog.ErrorContext(r.Context(), "Query Files", "err", err)
http.Error(w, "Error Query Files: "+err.Error(), http.StatusInternalServerError)