summaryrefslogtreecommitdiff
path: root/bin/db-update
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-09 15:39:41 +0200
committerErich Eckner <git@eckner.net>2018-05-09 15:39:41 +0200
commit6e95edd0ce5a455ff75f6f500f046b2e99c63f48 (patch)
tree4df824040c47c7d7e362789488c8d6f90bdc20cb /bin/db-update
parent99ab64ce137a4c139a399bf4286e7dc6ddf5e824 (diff)
downloadbuilder-6e95edd0ce5a455ff75f6f500f046b2e99c63f48.tar.xz
bin/db-update: keep binary_packages_in_repositories up to date
Diffstat (limited to 'bin/db-update')
-rwxr-xr-xbin/db-update5
1 files changed, 4 insertions, 1 deletions
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