summaryrefslogtreecommitdiff
path: root/bin/db-update
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-15 10:48:58 +0100
committerErich Eckner <git@eckner.net>2019-01-15 10:48:58 +0100
commit1f47da1679460296c05b5054b4c2865759236d79 (patch)
tree8ba78476b5475ba7742b4fba0ba5865b221d9c49 /bin/db-update
parentfb849148290dc00b59235bd0525f37ffed806bb2 (diff)
downloadbuilder-1f47da1679460296c05b5054b4c2865759236d79.tar.xz
bin/db-update: add some comments
Diffstat (limited to 'bin/db-update')
-rwxr-xr-xbin/db-update2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/db-update b/bin/db-update
index 4f7cfd3..ae79135 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -225,6 +225,7 @@ for source_stability in \
printf 'CREATE TEMPORARY TABLE `replaced_bpir` (`id` BIGINT, `replaced_by` BIGINT, UNIQUE KEY (`id`));\n'
printf 'CREATE TEMPORARY TABLE `moveable_bpir` (`id` BIGINT, `to_repository` MEDIUMINT, UNIQUE KEY (`id`));\n'
+ # packages that replace broken packages
printf 'INSERT IGNORE INTO `replaced_bpir` (`id`,`replaced_by`)'
printf ' SELECT `old_bpir`.`id`,`new_bpir`.`id`'
printf ' FROM `binary_packages_in_repositories` AS `new_bpir`'
@@ -263,6 +264,7 @@ for source_stability in \
printf ' JOIN `binary_packages_in_repositories` ON `binary_packages_in_repositories`.`id`=`replaced_bpir`.`id`'
printf ';\n'
+ # packages which replace nothing
printf 'INSERT IGNORE INTO `moveable_bpir` (`id`,`to_repository`)'
printf ' SELECT `binary_packages_in_repositories`.`id`,`repository_moves`.`to_repository`'
printf ' FROM `binary_packages_in_repositories`'