Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-478

Error with update-to-latest-db.mysqldiff.sql

    Details

      Description

      Ran the 1.4.2.01 update-to-latest-db.mysqldiff.sql on Database Version: 1.4.0.23. Got one error for the first pass, and the other with all the additional passes.

      First time thru...ERROR 1062 (23000): Duplicate entry '6083-AMOEBIC-en' for key 1.

      mysql> select * from concept_word where concept_name_id = 6083;
      +------------+-----------+---------+--------+-----------------+
      | concept_id | word      | synonym | locale | concept_name_id |
      +------------+-----------+---------+--------+-----------------+
      |         14 | AMOEBIC   |         | en     |            6083 | 
      |         14 | DIARRHOEA |         | en     |            6083 | 
      +------------+-----------+---------+--------+-----------------+
      

      Second time and forever...ERROR 1061 (42000): Duplicate key name 'concept_word_concept_idx'. Darius thought you might like to spend the holiday weekend with our concept dictionary and this error message. I did run these commands by hand:

      > delete from concept_word;
      > CREATE INDEX concept_word_concept_idx on concept_word (concept_id);
      > ALTER TABLE {{concept_word}} DROP PRIMARY KEY;
      > ALTER TABLE {{concept_word}} ADD PRIMARY KEY ({{concept_name_id}}, {{word}}, {{locale}});
      

      For dessert, I ran "Update concept word" (using a large range of 0-10000)

      The database seems repaired and fine.

        Attachments

          Activity

            People

            • Assignee:
              bwolfe Ben Wolfe
              Reporter:
              ball Ellen Ball
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: