Bug 32437: (QA follow-up) Prevent upgrade if wrong PRIMARY KEY key present
[srvgit] / installer / data / mysql / atomicupdate / bug_32437.pl
index 6ff9139..16343ad 100755 (executable)
@@ -12,6 +12,9 @@ return {
         } elsif( !primary_key_exists('import_auths','import_record_id') ){
             say $out "Found an existing PRIMARY KEY on import_auths table";
             say $out "You must delete this key and replace it with a key on import_record_id";
+            say $out "    ALTER TABLE import_auths DROP PRIMARY KEY;";
+            say $out "    ALTER TABLE import_auths ADD PRIMARY KEY (import_record_id);";
+            die "Interrupting installer process: database revision for bug 32437 fails!";
         } else {
             say $out "PRIMARY KEY import_record_id on import_auths already exists";
         }