From dcc2904b951cd4db84b61e21ec6423982c620ff8 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 31 Oct 2007 13:38:00 -0500 Subject: [PATCH] fix transfer of marc_breeding to import_records/import_biblios Problem was that z3950random is not a good unique key to use for linking new import_records and import_biblios rows. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- updater/updatedatabase | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/updater/updatedatabase b/updater/updatedatabase index 0b5fd6264c..408794e5bc 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -430,9 +430,9 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { FROM `marc_breeding`"); $dbh->do("INSERT INTO `import_records` - (`import_batch_id`, `record_sequence`, `marc`, `record_type`, `status`, + (`import_batch_id`, `import_record_id`, `record_sequence`, `marc`, `record_type`, `status`, `encoding`, `z3950random`, `marcxml`, `marcxml_old`) - SELECT `import_batch_id`, 1, `marc`, 'biblio', 'staged', `encoding`, `z3950random`, '', '' + SELECT `import_batch_id`, `id`, 1, `marc`, 'biblio', 'staged', `encoding`, `z3950random`, '', '' FROM `marc_breeding` JOIN `import_batches` ON (`file_name` = `file`)"); @@ -440,7 +440,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { (`import_record_id`, `title`, `author`, `isbn`) SELECT `import_record_id`, `title`, `author`, `isbn` FROM `marc_breeding` - JOIN `import_records` USING (`z3950random`)"); + JOIN `import_records` ON (`import_record_id` = `id`)"); $dbh->do("UPDATE `import_batches` SET `num_biblios` = ( -- 2.39.5