<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">We are trying to upgrade a test instance of ArchivesSpace from 1.4.2 to 1.5.1 and we have run into some SQL errors that have prevented the upgrade. We are using a copy of the production data.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Some help or suggestions would be greatly appreciated.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is basically what we have done.<o:p></o:p></p>
<p class="MsoNormal">* Get a MySQL dump of the production DB<o:p></o:p></p>
<p class="MsoNormal">* Copy the DB to a new server (now running MariaDB)<o:p></o:p></p>
<p class="MsoNormal">* Installed ArchivesSpace 1.4.2<o:p></o:p></p>
<p class="MsoNormal">* Started & indexed the 1.4.2 instance<o:p></o:p></p>
<p class="MsoNormal">* Tested the 1.4.2 instance and it was running fine<o:p></o:p></p>
<p class="MsoNormal">* Started the upgrade process for 1.5.1<o:p></o:p></p>
<p class="MsoNormal">* Stopped the 1.4.2 instance<o:p></o:p></p>
<p class="MsoNormal">* Unzipped the 1.5.1 archive to a new place<o:p></o:p></p>
<p class="MsoNormal">* Copied the data files to the 1.5.1/data directory<o:p></o:p></p>
<p class="MsoNormal">* Copied the config.rb<o:p></o:p></p>
<p class="MsoNormal">* Copied the mysql jdbc jar to lib<o:p></o:p></p>
<p class="MsoNormal">* Copied the plugins (we don't have any that I know of)<o:p></o:p></p>
<p class="MsoNormal">* Checked the en.yml files<o:p></o:p></p>
<p class="MsoNormal">* Ran the setup-database.sh script<o:p></o:p></p>
<p class="MsoNormal">* Setup stopped due to a Database error<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here is the text of the error we are seeing from the log file:<o:p></o:p></p>
<p class="MsoNormal">**** Begin error log output ****<o:p></o:p></p>
<p class="MsoNormal">Loading ArchivesSpace configuration file from path: /opt/archivesspace-1.5.1/archivesspace/config/config.rb<o:p></o:p></p>
<p class="MsoNormal">Loading ArchivesSpace configuration file from path: /opt/archivesspace-1.5.1/archivesspace/config/config.rb<o:p></o:p></p>
<p class="MsoNormal">Running migrations against jdbc:mysql://[DB_SERVER]:3306/[DB_NAME]?user=[REDACTED]&password=[REDACTED]&useUnicode=true&characterEncoding=UTF-8<o:p></o:p></p>
<p class="MsoNormal">!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<o:p></o:p></p>
<p class="MsoNormal">!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<o:p></o:p></p>
<p class="MsoNormal">!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<o:p></o:p></p>
<p class="MsoNormal">!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<o:p></o:p></p>
<p class="MsoNormal">!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<o:p></o:p></p>
<p class="MsoNormal">!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> 3 <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> Database migration error. <o:p></o:p></p>
<p class="MsoNormal"> Your upgrade has encountered a problem. <o:p></o:p></p>
<p class="MsoNormal"> You must resolve these issues before the database migration can complete.<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> Error: <o:p></o:p></p>
<p class="MsoNormal"> #<Sequel::UniqueConstraintViolation: Java::ComMysqlJdbcExceptionsJdbc4::MySQLIntegrityConstraintViolationException: Duplicate entry 'restriction_type' for key 'name'><o:p></o:p></p>
<p class="MsoNormal"> Java::ComMysqlJdbcExceptionsJdbc4::MySQLIntegrityConstraintViolationException: Duplicate entry 'restriction_type' for key 'name'<o:p></o:p></p>
<p class="MsoNormal"> java.lang.reflect.Constructor.newInstance(java/lang/reflect/Constructor.java:423)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.Util.handleNewInstance(com/mysql/jdbc/Util.java:425)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.Util.getInstance(com/mysql/jdbc/Util.java:408)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.SQLError.createSQLException(com/mysql/jdbc/SQLError.java:935)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.MysqlIO.checkErrorPacket(com/mysql/jdbc/MysqlIO.java:3970)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.MysqlIO.checkErrorPacket(com/mysql/jdbc/MysqlIO.java:3906)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.MysqlIO.sendCommand(com/mysql/jdbc/MysqlIO.java:2524)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.MysqlIO.sqlQueryDirect(com/mysql/jdbc/MysqlIO.java:2677)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.ConnectionImpl.execSQL(com/mysql/jdbc/ConnectionImpl.java:2545)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.StatementImpl.executeUpdateInternal(com/mysql/jdbc/StatementImpl.java:1540)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.StatementImpl.executeLargeUpdate(com/mysql/jdbc/StatementImpl.java:2603)<o:p></o:p></p>
<p class="MsoNormal">com.mysql.jdbc.StatementImpl.executeUpdate(com/mysql/jdbc/StatementImpl.java:1604)<o:p></o:p></p>
<p class="MsoNormal">java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)<o:p></o:p></p>
<p class="MsoNormal">RUBY.execute_statement_insert(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc/mysql.rb:68)<o:p></o:p></p>
<p class="MsoNormal">RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:256)<o:p></o:p></p>
<p class="MsoNormal">RUBY.log_yield(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/logging.rb:33)<o:p></o:p></p>
<p class="MsoNormal">RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:256)<o:p></o:p></p>
<p class="MsoNormal">RUBY.statement(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:646)<o:p></o:p></p>
<p class="MsoNormal">RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:245)<o:p></o:p></p>
<p class="MsoNormal">RUBY.hold(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/connection_pool/threaded.rb:98)<o:p></o:p></p>
<p class="MsoNormal">RUBY.synchronize(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:255)<o:p></o:p></p>
<p class="MsoNormal">RUBY.execute(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:244)<o:p></o:p></p>
<p class="MsoNormal">RUBY.execute_insert(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:276)<o:p></o:p></p>
<p class="MsoNormal">RUBY.execute_insert(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:927)<o:p></o:p></p>
<p class="MsoNormal">RUBY.insert(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:336)<o:p></o:p></p>
<p class="MsoNormal">RUBY.create_enum(/opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/migrations/utils.rb:45)<o:p></o:p></p>
<p class="MsoNormal">RUBY.create_editable_enum(/opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/migrations/utils.rb:38)<o:p></o:p></p>
<p class="MsoNormal">RUBY.(root)(/opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/migrations/060_top_container_migration.rb:15)<o:p></o:p></p>
<p class="MsoNormal">org.jruby.RubyBasicObject.instance_eval(org/jruby/RubyBasicObject.java:1574)<o:p></o:p></p>
<p class="MsoNormal">RUBY.apply(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:100)<o:p></o:p></p>
<p class="MsoNormal">RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:528)<o:p></o:p></p>
<p class="MsoNormal">RUBY.checked_transaction(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:466)<o:p></o:p></p>
<p class="MsoNormal">RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:527)<o:p></o:p></p>
<p class="MsoNormal">org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613)<o:p></o:p></p>
<p class="MsoNormal">RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:524)<o:p></o:p></p>
<p class="MsoNormal">RUBY.run(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:391)<o:p></o:p></p>
<p class="MsoNormal">RUBY.setup_database(file:/opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/db_migrator.rb:185)<o:p></o:p></p>
<p class="MsoNormal">$_dot_dot_.scripts.rb.migrate_db.(root)(../scripts/rb/migrate_db.rb:43)<o:p></o:p></p>
<p class="MsoNormal">$_dot_dot_.scripts.rb.migrate_db.(root)($_dot_dot_/scripts/rb/../scripts/rb/migrate_db.rb:43)<o:p></o:p></p>
<p class="MsoNormal">RUBY.connect(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:69)<o:p></o:p></p>
<p class="MsoNormal">RUBY.connect(/opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/core.rb:95)<o:p></o:p></p>
<p class="MsoNormal">$_dot_dot_.scripts.rb.migrate_db.(root)(../scripts/rb/migrate_db.rb:28)<o:p></o:p></p>
<p class="MsoNormal">$_dot_dot_.scripts.rb.migrate_db.(root)($_dot_dot_/scripts/rb/../scripts/rb/migrate_db.rb:28)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> 3<o:p></o:p></p>
<p class="MsoNormal">Sequel::UniqueConstraintViolation: Java::ComMysqlJdbcExceptionsJdbc4::MySQLIntegrityConstraintViolationException: Duplicate entry 'restriction_type' for key 'name'<o:p></o:p></p>
<p class="MsoNormal"> raise_error at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/misc.rb:423<o:p></o:p></p>
<p class="MsoNormal"> statement at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:648<o:p></o:p></p>
<p class="MsoNormal"> execute at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:245<o:p></o:p></p>
<p class="MsoNormal"> hold at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/connection_pool/threaded.rb:98<o:p></o:p></p>
<p class="MsoNormal"> synchronize at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:255<o:p></o:p></p>
<p class="MsoNormal"> execute at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:244<o:p></o:p></p>
<p class="MsoNormal"> execute_insert at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:276<o:p></o:p></p>
<p class="MsoNormal"> execute_insert at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:927<o:p></o:p></p>
<p class="MsoNormal"> insert at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:336<o:p></o:p></p>
<p class="MsoNormal"> create_enum at /opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/migrations/utils.rb:45<o:p></o:p></p>
<p class="MsoNormal"> create_editable_enum at /opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/migrations/utils.rb:38<o:p></o:p></p>
<p class="MsoNormal"> (root) at /opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/migrations/060_top_container_migration.rb:15<o:p></o:p></p>
<p class="MsoNormal"> instance_eval at org/jruby/RubyBasicObject.java:1574<o:p></o:p></p>
<p class="MsoNormal"> apply at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:100<o:p></o:p></p>
<p class="MsoNormal"> run at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:528<o:p></o:p></p>
<p class="MsoNormal"> checked_transaction at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:466<o:p></o:p></p>
<p class="MsoNormal"> run at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:527<o:p></o:p></p>
<p class="MsoNormal"> each at org/jruby/RubyArray.java:1613<o:p></o:p></p>
<p class="MsoNormal"> run at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:524<o:p></o:p></p>
<p class="MsoNormal"> run at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:391<o:p></o:p></p>
<p class="MsoNormal"> setup_database at file:/opt/archivesspace-1.5.1/archivesspace/lib/common.jar!/db/db_migrator.rb:185<o:p></o:p></p>
<p class="MsoNormal"> (root) at ../scripts/rb/migrate_db.rb:43<o:p></o:p></p>
<p class="MsoNormal"> connect at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:69<o:p></o:p></p>
<p class="MsoNormal"> connect at /opt/archivesspace-1.5.1/archivesspace/gems/gems/sequel-4.20.0/lib/sequel/core.rb:95<o:p></o:p></p>
<p class="MsoNormal"> (root) at ../scripts/rb/migrate_db.rb:28<o:p></o:p></p>
<p class="MsoNormal">**** End error log output ****<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thank you for your time.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal"><u><span style="font-size:10.0pt;color:#365F91">__________________________<o:p></o:p></span></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#365F91">Brent Ellingson<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#365F91">Sr. Software Engineer<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#365F91">2750 Harold B. Lee Library<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#365F91">Brigham Young University<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#365F91">(801)422-6148<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>