From 6e95edd0ce5a455ff75f6f500f046b2e99c63f48 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 9 May 2018 15:39:41 +0200 Subject: bin/db-update: keep binary_packages_in_repositories up to date --- bin/db-update | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/db-update b/bin/db-update index 7d261e1..a2555fe 100755 --- a/bin/db-update +++ b/bin/db-update @@ -398,8 +398,11 @@ for source_stability in 'testing' 'staging'; do printf ' JOIN `replaced_binary_packages` ON `binary_packages`.`id`=`replaced_binary_packages`.`id`;\n' printf 'UPDATE `binary_packages`' printf ' JOIN `moved_binary_packages` ON `binary_packages`.`id`=`moved_binary_packages`.`id`' + printf ' LEFT' + mysql_join_binary_packages_binary_packages_in_repositories printf ' SET `binary_packages`.`repository`=`moved_binary_packages`.`new_repository`,' - printf ' `binary_packages`.`last_moved`=NOW()' + printf '`binary_packages_in_repositories`.`repository`=`moved_binary_packages`.`new_repository`,' + printf '`binary_packages`.`last_moved`=NOW()' printf ' WHERE `binary_packages`.`repository`!=`moved_binary_packages`.`new_repository`;\n' } | \ mysql_run_query -- cgit v1.2.3-70-g09d2