[Archivesspace_Users_Group] Database migration error for 3.3.1 to 3.4.0 during database-setup script run

Kirk Manegold manegold at asu.edu
Tue Aug 8 17:40:58 EDT 2023


Well, that took some time to figure out.

DB migration step 168 was used to strip white space from the enumeration_value table for the value field.  Several of our values had whitespace leading the values in.  Since multiple values created a duplicate index values, the database migration script failed.    Once I removed the white space before and after the value field values, the migration completed. If that makes any sense whatsoever.   Regardless, I finished the migration step.  I'm also quite pleased with seeing the code for the migration to help figure out what was going one beyond poking and prodding. (e.g. https://github.com/archivesspace/archivesspace/blob/master/common/db/migrations/168_enum_values_strip_ws.rb ).

-Kirk


Kirk Manegold
System Architect
ASU Library | Technology Services | Systems & Security
p: 480-965-6230<tel:480-965-6230>
email: manegold at asu.edu<mailto:manegold at asu.edu>
web: https://lib.asu.edu/systems/help

From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Kirk Manegold
Sent: Tuesday, August 8, 2023 12:14 PM
To: archivesspace_users_group at lyralists.lyrasis.org
Subject: [Archivesspace_Users_Group] Database migration error for 3.3.1 to 3.4.0 during database-setup script run

Hello.

I ran through our typical update process from 3.3.1 to 3.4.0 and hit a snag with the setup-database.sh script.  I keep getting an duplicate entry  error:

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!                                                                                                !!
    !!                                      Database migration error.                                 !!
    !!                                  Your upgrade has encountered a problem.                       !!
    !!                  You must resolve these issues before the database migration can complete.     !!
    !!                                                                                                !!
    !!                                                                                                !!
    !!                                                Error:                                          !!
    !! Java::JavaSql::SQLIntegrityConstraintViolationException: Duplicate entry '1-Interviewer' for key 'enumeration_value.enumeration_value_uniq'
    !!                                                                                                !!
    !!                                                                                                !!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I dug through the enumeration_value table and updated the values with 'Interviewer' with unique values (e.g. I added an increment number to them) for the enumeration_id of '1'.  However, I can't get past this error.  Any ideas?

-Kirk



Kirk Manegold
System Architect
ASU Library | Technology Services | Systems & Security
Arizona State University
Mail Code: 1006
Charles T. Hayden Library
Tempe, AZ 85287-1006
p: 480-965-6230<tel:480-965-6230>
email: manegold at asu.edu<mailto:manegold at asu.edu>
web: https://lib.asu.edu/systems/help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20230808/8ff171b2/attachment.html>


More information about the Archivesspace_Users_Group mailing list