This commit is contained in:
parent
1af3a3d5b9
commit
fa1deed55a
3 changed files with 4 additions and 5 deletions
|
@ -1,4 +1,4 @@
|
||||||
ALTER TABLE tasks
|
ALTER TABLE files
|
||||||
DROP IF EXISTS old_md5,
|
DROP IF EXISTS old_md5,
|
||||||
DROP IF EXISTS old_ffprobe_data,
|
DROP IF EXISTS old_ffprobe_data,
|
||||||
DROP IF EXISTS old_size bigint;
|
DROP IF EXISTS old_size;
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
ALTER TABLE libraries
|
ALTER TABLE files ADD old_md5 uuid,
|
||||||
ADD old_md5 uuid,
|
|
||||||
ADD old_ffprobe_data JSONB,
|
ADD old_ffprobe_data JSONB,
|
||||||
ADD old_size bigint;
|
ADD old_size bigint;
|
||||||
|
|
|
@ -65,7 +65,7 @@ func handleLibrary(w http.ResponseWriter, r *http.Request) {
|
||||||
Enable: enabled,
|
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 {
|
if err != nil {
|
||||||
slog.ErrorContext(r.Context(), "Query Files", "err", err)
|
slog.ErrorContext(r.Context(), "Query Files", "err", err)
|
||||||
http.Error(w, "Error Query Files: "+err.Error(), http.StatusInternalServerError)
|
http.Error(w, "Error Query Files: "+err.Error(), http.StatusInternalServerError)
|
||||||
|
|
Loading…
Add table
Reference in a new issue