From 97d9bb3e509ec19b37e67f670831c7d40892ffb4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 18 Jul 2018 13:43:41 +0200 Subject: why-dont-you - work in progress --- bin/why-dont-you | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bin/why-dont-you') diff --git a/bin/why-dont-you b/bin/why-dont-you index 2ea27ab..78587a5 100755 --- a/bin/why-dont-you +++ b/bin/why-dont-you @@ -253,7 +253,7 @@ case "${action}" in printf ' `content_type` ENUM("bpir","it"),' printf ' `reason_length` MEDIUMINT,' printf ' `active` BIT,' - printf ' `relevant` BIT,' + printf ' `relevance_level` MEDIUMINT,' printf ' UNIQUE KEY (`id`),' printf ' UNIQUE KEY `content`(`content_id`,`content_type`));\n' printf 'CREATE TEMPORARY TABLE `edges%s` (' \ @@ -403,8 +403,13 @@ case "${action}" in printf ' AND `i`.`content_type`="bpir";\n' while read -r bpir pkgname; do - printf 'CALL `find_the_culprit`(%s);\n' \ - "${bpir}" + printf 'CALL `find_the_culprit`(' + printf '(SELECT `knots`.`id`' + printf ' FROM `knots`' + printf ' WHERE `knots`.`content_type`="bpir"' + printf ' AND `knots`.`content_id`=%s)' \ + "${bpir}" + printf ');\n' done < \ "${tmp_dir}/packages" } | \ -- cgit v1.2.3-70-g09d2