Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/database-layout.dump53
1 files changed, 37 insertions, 16 deletions
diff --git a/misc/database-layout.dump b/misc/database-layout.dump
index c1d8dd1..aa43e3c 100644
--- a/misc/database-layout.dump
+++ b/misc/database-layout.dump
@@ -97,28 +97,49 @@ INSERT IGNORE INTO `replaced_bpir` (`id`,`replaced_by`)
ON `m_bpir`.`id`=`moveable_bpir`.`id`
JOIN `binary_packages` AS `m_bp`
ON `m_bpir`.`package`=`m_bp`.`id`
- JOIN `repositories` AS `m_from_r`
- ON `m_bpir`.`repository`=`m_from_r`.`id`
JOIN `repositories` AS `m_to_r`
ON `moveable_bpir`.`to_repository`=`m_to_r`.`id`
- JOIN `repository_stability_relations` AS `rsr_a`
- ON `rsr_a`.`less_stable`=`m_to_r`.`stability`
+ JOIN `repository_stability_relations` AS `rsr`
+ ON `rsr`.`less_stable`=`m_to_r`.`stability`
JOIN `repositories` AS `r_r`
- ON `rsr_a`.`more_stable`=`r_r`.`stability` AND `r_r`.`architecture`=`m_to_r`.`architecture`
+ ON `rsr`.`more_stable`=`r_r`.`stability` AND `r_r`.`architecture`=`m_to_r`.`architecture`
JOIN `binary_packages_in_repositories` AS `r_bpir`
ON `r_r`.`id`=`r_bpir`.`repository`
JOIN `binary_packages` AS `r_bp`
- ON `r_bpir`.`package`=`r_bp`.`id` AND `r_bp`.`pkgname`=`m_bp`.`pkgname`
- WHERE NOT EXISTS (
-SELECT 1
- FROM `binary_packages_in_repositories` AS `sup_bpir`
- JOIN `binary_packages` AS `sup_bp`
- ON `sup_bpir`.`package`=`sup_bp`.`id`
- JOIN `repositories` AS `sup_r`
- ON `sup_bpir`.`repository`=`sup_r`.`id`
- JOIN `repository_stability_relations` AS `rsr_b`
- ON `rsr_b`.`less_stable`=`sup_r`.`stability`
- WHERE `sup_bp`.`pkgname`=`m_bp`.`pkgname` AND `sup_r`.`architecture`=`m_to_r`.`architecture` AND `rsr_b`.`more_stable`=`r_r`.`stability`);
+ ON `r_bpir`.`package`=`r_bp`.`id` AND `r_bp`.`pkgname`=`m_bp`.`pkgname`;
+DELETE
+ FROM `replaced_bpir_copy`;
+INSERT IGNORE INTO `replaced_bpir_copy`
+ SELECT `replaced_bpir`.*
+ FROM `replaced_bpir`;
+DELETE
+ FROM `replaced_bpir_copy2`;
+INSERT IGNORE INTO `replaced_bpir_copy2`
+ SELECT `replaced_bpir`.*
+ FROM `replaced_bpir`;
+DELETE
+ FROM `moveable_bpir_copy`;
+INSERT IGNORE INTO `moveable_bpir_copy`
+ SELECT `moveable_bpir`.*
+ FROM `moveable_bpir`;
+DELETE `replaced_bpir`
+ FROM `replaced_bpir`
+ JOIN `binary_packages_in_repositories` AS `not_r_bpir`
+ ON `not_r_bpir`.`id`=`replaced_bpir`.`id`
+ JOIN `binary_packages` AS `not_r_bp`
+ ON `not_r_bpir`.`package`=`not_r_bp`.`id`
+ JOIN `repositories` AS `not_r_r`
+ ON `not_r_bpir`.`repository`=`not_r_r`.`id`
+ JOIN `binary_packages` AS `r_bp`
+ ON `r_bp`.`pkgname`=`not_r_bp`.`pkgname` AND `r_bp`.`id`!=`not_r_bp`.`id`
+ JOIN `binary_packages_in_repositories` AS `r_bpir`
+ ON `r_bp`.`id`=`r_bpir`.`package`
+ JOIN `replaced_bpir_copy`
+ ON `r_bpir`.`id`=`replaced_bpir_copy`.`id`
+ JOIN `repositories` AS `r_r`
+ ON `r_bpir`.`repository`=`r_r`.`id` AND `not_r_r`.`architecture`=`r_r`.`architecture`
+ JOIN `repository_stability_relations` AS `rsr`
+ ON `rsr`.`less_stable`=`r_r`.`stability` AND `rsr`.`more_stable`=`not_r_r`.`stability`;
REPEAT
SET row_count_saved = 0;
DELETE