From 8aeca7194277ab52126bb3358635743be2ed7e2d Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 25 May 2018 13:40:36 +0200 Subject: lib/mysql-functions: make mysql_join_binary_packages_repositories and mysql_join_repositories_binary_packages obsolete --- bin/db-update | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'bin/db-update') diff --git a/bin/db-update b/bin/db-update index 33a1436..f817833 100755 --- a/bin/db-update +++ b/bin/db-update @@ -149,7 +149,8 @@ for source_stability in 'testing' 'staging'; do sed 's/,$/;\n/' printf 'DELETE `moveable_binary_packages` FROM `moveable_binary_packages`' printf ' JOIN `binary_packages` ON `binary_packages`.`id`=`moveable_binary_packages`.`id`' - mysql_join_binary_packages_repositories + mysql_join_binary_packages_binary_packages_in_repositories + mysql_join_binary_packages_in_repositories_repositories mysql_join_repositories_repository_stabilities printf ' WHERE `repository_stabilities`.`name`!="%s";\n' \ "${source_stability}" @@ -177,7 +178,8 @@ for source_stability in 'testing' 'staging'; do printf 'INSERT IGNORE INTO `replaced_binary_packages` (`id`,`replaced_by`)' printf ' SELECT `binary_packages`.`id`,`subst_bp`.`id`' printf ' FROM `binary_packages`' - mysql_join_binary_packages_repositories + mysql_join_binary_packages_binary_packages_in_repositories + mysql_join_binary_packages_in_repositories_repositories printf ' AND `repositories`.`is_on_master_mirror`' mysql_join_binary_packages_build_assignments mysql_join_build_assignments_package_sources @@ -187,7 +189,8 @@ for source_stability in 'testing' 'staging'; do printf ' JOIN `binary_packages` AS `subst_bp`' printf ' ON `binary_packages`.`pkgname`=`subst_bp`.`pkgname`' printf ' AND `repository_moves`.`from_repository`=`subst_bp`.`repository`' - mysql_join_binary_packages_repositories 'subst_bp' 'subst_r' + mysql_join_binary_packages_binary_packages_in_repositories 'subst_bp' 'subst_bpir' + mysql_join_binary_packages_in_repositories_repositories 'subst_bpir' 'subst_r' mysql_join_repositories_repository_stabilities 'subst_r' 'subst_rs' printf ' AND `subst_rs`.`name`="%s"' \ "${source_stability}" @@ -208,7 +211,8 @@ for source_stability in 'testing' 'staging'; do printf 'INSERT IGNORE INTO `moveable_binary_packages` (`id`,`to_repository`)' printf ' SELECT `binary_packages`.`id`,`repository_moves`.`to_repository`' printf ' FROM `binary_packages`' - mysql_join_binary_packages_repositories + mysql_join_binary_packages_binary_packages_in_repositories + mysql_join_binary_packages_in_repositories_repositories printf ' AND `repositories`.`is_on_master_mirror`' mysql_join_repositories_repository_stabilities printf ' AND `repository_stabilities`.`name`="%s"' \ @@ -253,7 +257,8 @@ for source_stability in 'testing' 'staging'; do printf ',`repositories`.`name`,`new_repo`.`name`' printf ' FROM `moveable_binary_packages`' printf ' JOIN `binary_packages` ON `moveable_binary_packages`.`id`=`binary_packages`.`id`' - mysql_join_binary_packages_repositories + mysql_join_binary_packages_binary_packages_in_repositories + mysql_join_binary_packages_in_repositories_repositories mysql_join_binary_packages_architectures printf ' JOIN `repositories` AS `new_repo` ON `new_repo`.`id`=`moveable_binary_packages`.`to_repository`' printf ';\n' @@ -266,7 +271,8 @@ for source_stability in 'testing' 'staging'; do printf ',`repositories`.`name`' printf ' FROM `replaced_binary_packages`' printf ' JOIN `binary_packages` ON `replaced_binary_packages`.`id`=`binary_packages`.`id`' - mysql_join_binary_packages_repositories + mysql_join_binary_packages_binary_packages_in_repositories + mysql_join_binary_packages_in_repositories_repositories mysql_join_binary_packages_architectures printf ';\n' } | \ -- cgit v1.2.3-70-g09d2