<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>I believe I've figured out the complete issue and... Its down to pilot error. I've been using phpmyadmin to manage my db stuff and I had been copying from a known good db into new versions for testing. Here's where the pilot error comes in - I stupidly
 forgot to tick off the "Add Constraints" option when doing the copy operation (why that isn't a default I don't know...)....sigh.</div>
<div><br>
</div>
<div>Joshua</div>
<div>
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Joshua Shaw<br>
<span style="font-weight:bold">Reply-To: </span>Archivesspace Users Group<br>
<span style="font-weight:bold">Date: </span>Tuesday, November 10, 2015 at 11:51 AM<br>
<span style="font-weight:bold">To: </span>Archivesspace Users Group<br>
<span style="font-weight:bold">Subject: </span>Re: [Archivesspace_Users_Group] migration error v1.3.0->v1.4+<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>Just wanted to update the group on how I <span style="font-weight: bold;">fixed</span> (for a given value of fixed) this problem. I'm still unsure of the root cause, but what I eventually wound up doing was recreating the migration steps manually. I added
 the constraints, etc by hand and then ran the migration - which theoretically shouldn't have needed to do anything at that point. </div>
<div><br>
</div>
<div>I had to manually enter the constraints for all of the tables mentioned in the 059 migration file: job, job_input_file, job_created_record, job_modified_file, preference, group, group_permission, & group_user.</div>
<div><br>
</div>
<div>I'd still love to know <span style="font-weight: bold;">why</span> this particular migration failed and if any of the devs have any insight into the issue.</div>
<div><br>
</div>
<div>Thanks!</div>
<div>Joshua</div>
<div>
<div id=""></div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Joshua Shaw<br>
<span style="font-weight:bold">Reply-To: </span>Archivesspace Users Group<br>
<span style="font-weight:bold">Date: </span>Friday, November 6, 2015 at 11:10 AM<br>
<span style="font-weight:bold">To: </span>Archivesspace Users Group<br>
<span style="font-weight:bold">Subject: </span>Re: [Archivesspace_Users_Group] migration error v1.3.0->v1.4+<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>No problem!</div>
<div><br>
</div>
<div>I think I'll wait for a dev to chime in to see if they can offer any insight. I can also do a clean test migration into 1.3 without any plugin migrations and check that against the v1.4 migrations to see if its a plugin interaction. That'll be fun....;-)</div>
<div><br>
</div>
<div>Joshua</div>
<div>
<div id=""></div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span><Suda>, Phillip J<br>
<span style="font-weight:bold">Reply-To: </span>Archivesspace Users Group<br>
<span style="font-weight:bold">Date: </span>Friday, November 6, 2015 at 10:33 AM<br>
<span style="font-weight:bold">To: </span>Archivesspace Users Group<br>
<span style="font-weight:bold">Subject: </span>Re: [Archivesspace_Users_Group] migration error v1.3.0->v1.4+<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Apologies for the misunderstanding. I was running a migration from AT & Archon to ASpace 1.3 using the new migration tool. 
<div class=""><br class="">
</div>
<div class="">I would check to make sure your config.rb file in the 1.4* version is pointing at the right db. I would check your /lib directory to make sure it has the mysql connector. Also, I would stop archivessapce, backup/delete/rename your solr index,
 and then restart/reattempt. </div>
<div class=""><br class="">
</div>
<div class="">Sorry I cannot be more helpful. </div>
<div class=""><br class="">
</div>
<div class="">Thanks, </div>
<div class=""><br class="">
</div>
<div class="">Phil </div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Nov 6, 2015, at 9:16 AM, Joshua D. Shaw <<a href="mailto:Joshua.D.Shaw@dartmouth.edu" class="">Joshua.D.Shaw@dartmouth.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Calibri, sans-serif;" class="">
<div class="">
<div class="">Thanks Phil-</div>
<div class=""><br class="">
</div>
<div class="">Were you migrating from AT to AS v1.3 or from an earlier version of AS to v1.3? Since we are running production on v1.3, we're kinda stuck at that version until we can go forward. Unless I'm missing something here about the migration tool?</div>
<div class=""><br class="">
</div>
<div class="">Joshua</div>
<div class="">
<div id="" class=""></div>
</div>
</div>
<div class=""><br class="">
</div>
<span id="OLK_SRC_BODY_SECTION" class="">
<div style="font-family: Calibri; font-size: 12pt; text-align: left; border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-top-color: rgb(181, 196, 223);" class="">
<span style="font-weight:bold" class="">From: </span><Suda>, Phillip J<br class="">
<span style="font-weight:bold" class="">Reply-To: </span>Archivesspace Users Group<br class="">
<span style="font-weight:bold" class="">Date: </span>Friday, November 6, 2015 at 10:03 AM<br class="">
<span style="font-weight:bold" class="">To: </span>Archivesspace Users Group<br class="">
<span style="font-weight:bold" class="">Subject: </span>Re: [Archivesspace_Users_Group] migration error v1.3.0->v1.4+<br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
I ran into the same problem. I used the refactored migration tool to migrate to ASpace 1.3.0 and then upgrade to 1.4.2 after that. It is a work around. 
<div class=""><br class="">
</div>
<div class="">Thanks, </div>
<div class=""><br class="">
</div>
<div class="">Phil </div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Phillip Suda<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Systems Librarian<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Howard-Tilton Memorial Library<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Tulane University<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<a href="mailto:psuda1@tulane.edu" style="color: rgb(149, 79, 114);" class="">psuda1@tulane.edu</a><o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
504-865-5607</div>
</div>
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On Nov 6, 2015, at 8:56 AM, Joshua D. Shaw <<a href="mailto:Joshua.D.Shaw@dartmouth.edu" class="">Joshua.D.Shaw@dartmouth.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">
<div class="">
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class="">Hi all-</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class=""><br class="">
</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class="">I'm starting to test the v1.4 releases and have run into an issue with migrations. v1.3.0 works just fine, but when I clone my db and then attempt to run the setup-database script for
 any 1.4+ release, I get the error below. I've checked the table referenced in the migration file on line 12 (the job table) and the structure seems to be ok - at least there's a column labeled repo_id in there, though I have no data in that table.</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class=""><br class="">
</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class="">Any thoughts as to what might be the cause? We (Dartmouth) may be extra special since we are running a bunch of plugins.</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class=""><br class="">
</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class="">Thanks!</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class="">Joshua</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class=""><br class="">
</div>
<div class="">
<div class=""><font face="Calibri,sans-serif" class="">Error: </font></div>
<div class=""><font face="Calibri,sans-serif" class="">     #<Sequel::Error: Missing foreign key for [:repo_id]></font></div>
<div class=""><font face="Calibri,sans-serif" class="">     Missing foreign key for [:repo_id]</font></div>
<div class=""><font face="Calibri,sans-serif" class="">     /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:736:in `foreign_key_name'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/shared/mysql.rb:227:in `alter_table_op_sql'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:480:in `alter_table_sql_list'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">org/jruby/RubyArray.java:1613:in `each'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:478:in `alter_table_sql_list'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/utils/split_alter_table.rb:35:in `apply_alter_table'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">org/jruby/RubyArray.java:1613:in `each'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/utils/split_alter_table.rb:33:in `apply_alter_table'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:423:in `apply_alter_table_generator'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:79:in `alter_table'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/lib/common.jar!/db/migrations/059_add_on_cascade_delete_to_repo_fk.rb:12:in `(root)'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">org/jruby/RubyBasicObject.java:1574:in `instance_eval'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:100:in `apply'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:528:in `run'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:466:in `checked_transaction'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:527:in `run'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">org/jruby/RubyArray.java:1613:in `each'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:524:in `run'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:391:in `run'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">file:/Applications/archivesspace-v140/lib/common.jar!/db/db_migrator.rb:185:in `setup_database'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">../scripts/rb/migrate_db.rb:43:in `(root)'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:69:in `connect'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/core.rb:95:in `connect'</font></div>
<div class=""><font face="Calibri,sans-serif" class="">../scripts/rb/migrate_db.rb:28:in `(root)'</font></div>
<div class=""><font face="Calibri,sans-serif" class=""><br class="">
</font></div>
<div class=""><font face="Calibri,sans-serif" class="">     </font></div>
<div class=""><font face="Calibri,sans-serif" class="">     3</font></div>
<div class=""><font face="Calibri,sans-serif" class="">Sequel::Error: Missing foreign key for [:repo_id]</font></div>
<div class=""><font face="Calibri,sans-serif" class="">             foreign_key_name at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:736</font></div>
<div class=""><font face="Calibri,sans-serif" class="">           alter_table_op_sql at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/shared/mysql.rb:227</font></div>
<div class=""><font face="Calibri,sans-serif" class="">         alter_table_sql_list at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:480</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                         each at org/jruby/RubyArray.java:1613</font></div>
<div class=""><font face="Calibri,sans-serif" class="">         alter_table_sql_list at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:478</font></div>
<div class=""><font face="Calibri,sans-serif" class="">            apply_alter_table at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/utils/split_alter_table.rb:35</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                         each at org/jruby/RubyArray.java:1613</font></div>
<div class=""><font face="Calibri,sans-serif" class="">            apply_alter_table at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/utils/split_alter_table.rb:33</font></div>
<div class=""><font face="Calibri,sans-serif" class="">  apply_alter_table_generator at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:423</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                  alter_table at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:79</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                       (root) at /Applications/archivesspace-v140/lib/common.jar!/db/migrations/059_add_on_cascade_delete_to_repo_fk.rb:12</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                instance_eval at org/jruby/RubyBasicObject.java:1574</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                        apply at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:100</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                          run at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:528</font></div>
<div class=""><font face="Calibri,sans-serif" class="">          checked_transaction at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:466</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                          run at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:527</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                         each at org/jruby/RubyArray.java:1613</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                          run at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:524</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                          run at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:391</font></div>
<div class=""><font face="Calibri,sans-serif" class="">               setup_database at file:/Applications/archivesspace-v140/lib/common.jar!/db/db_migrator.rb:185</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                       (root) at ../scripts/rb/migrate_db.rb:43</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                      connect at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:69</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                      connect at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/core.rb:95</font></div>
<div class=""><font face="Calibri,sans-serif" class="">                       (root) at ../scripts/rb/migrate_db.rb:28</font></div>
</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class=""><br class="">
</div>
<div style="font-family: Calibri, sans-serif; font-size: 14px;" class="">
<div id="" class=""></div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
Archivesspace_Users_Group mailing list<br class="">
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br class="">
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group" class="">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br class="">
</div>
</blockquote>
</div>
<br class="">
<div apple-content-edited="true" class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<br class="">
</div>
</div>
</div>
<br class="">
</div>
</div>
</div>
</span></div>
_______________________________________________<br class="">
Archivesspace_Users_Group mailing list<br class="">
<a href="mailto:Archivesspace_Users_Group@lyralists.lyrasis.org" class="">Archivesspace_Users_Group@lyralists.lyrasis.org</a><br class="">
<a href="http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group">http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group</a><br class="">
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div class="">
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Phillip Suda<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Systems Librarian<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Howard-Tilton Memorial Library<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Tulane University<o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<a href="mailto:psuda1@tulane.edu" style="color: rgb(149, 79, 114);" class="">psuda1@tulane.edu</a><o:p class=""></o:p></div>
<div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
504-865-5607</div>
</div>
</div>
<br class="">
</div>
</div>
</div>
</span></div>
</div>
</span></div>
</div>
</span>
</body>
</html>