summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-03-27 09:22:45 +0200
committerErich Eckner <git@eckner.net>2018-03-27 09:22:45 +0200
commit9e7bb62bb58ca3a50e35fa8b814ce16b6973ab18 (patch)
treef35cf25f3a9f275ecabc16373e19c580f37a3e8c /bin
parent9e37d9e6cd70e6e7ddc4b48d7056c45342555ad6 (diff)
downloadbuilder-9e7bb62bb58ca3a50e35fa8b814ce16b6973ab18.tar.xz
bin/return-assignment: remove duplicate files from table instead of failing
Diffstat (limited to 'bin')
-rwxr-xr-xbin/return-assignment2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 6af8c84..6447dce 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -470,7 +470,7 @@ trigger_mirror_refreshs
printf 'UPDATE `pkg_files`'
printf ' SET `pkg_files`.`name_hash`=sha2(`pkg_files`.`name`,512),'
printf ' `pkg_files`.`absolute_name_hash`=sha2(concat(`pkg_files`.`path`,`pkg_files`.`name`),512);\n'
- printf 'ALTER TABLE `pkg_files` ADD UNIQUE INDEX `absolute_name_hash` (`absolute_name_hash`);\n'
+ printf 'ALTER IGNORE TABLE `pkg_files` ADD UNIQUE INDEX `absolute_name_hash` (`absolute_name_hash`);\n'
printf 'INSERT IGNORE INTO `files` (`path`,`name`,`name_hash`,`absolute_name_hash`)'
printf ' SELECT '
printf '`pkg_files`.`%s`,' \