reproducible debian: build.sh: fix SQL error

ERROR: column reference "package_id" is ambiguous LINE 1: ...led16-arm64.debian.net', job='arm64_4/9231' WHERE package_id... ^ Now, I can't see how it can possibly be ambiguous in such query with only one table involved, but whatever… Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent 34570a21
......@@ -170,7 +170,7 @@ update_db_and_html() {
fi
fi
# Insert or update existing entry in results table
query_db "INSERT INTO results (package_id, version, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPKGID', '$VERSION', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB') ON CONFLICT (package_id) DO UPDATE SET version='$VERSION', status='$STATUS', build_date='$DATE', build_duration='$DURATION', node1='$NODE1', node2='$NODE2', job='$JOB' WHERE package_id='$SRCPKGID'"
query_db "INSERT INTO results (package_id, version, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPKGID', '$VERSION', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB') ON CONFLICT (package_id) DO UPDATE SET version='$VERSION', status='$STATUS', build_date='$DATE', build_duration='$DURATION', node1='$NODE1', node2='$NODE2', job='$JOB' WHERE results.package_id='$SRCPKGID'"
query_db "INSERT INTO stats_build (name, version, suite, architecture, status, build_date, build_duration, node1, node2, job) VALUES ('$SRCPACKAGE', '$VERSION', '$SUITE', '$ARCH', '$STATUS', '$DATE', '$DURATION', '$NODE1', '$NODE2', '$JOB')"
# unmark build since it's properly finished
query_db "DELETE FROM schedule WHERE package_id='$SRCPKGID';"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment