[Archivesspace_Users_Group] migration error v1.3.0->v1.4+
Joshua D. Shaw
Joshua.D.Shaw at dartmouth.edu
Tue Nov 10 11:51:48 EST 2015
Just wanted to update the group on how I fixed (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.
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.
I'd still love to know why this particular migration failed and if any of the devs have any insight into the issue.
Thanks!
Joshua
From: Joshua Shaw
Reply-To: Archivesspace Users Group
Date: Friday, November 6, 2015 at 11:10 AM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] migration error v1.3.0->v1.4+
No problem!
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....;-)
Joshua
From: <Suda>, Phillip J
Reply-To: Archivesspace Users Group
Date: Friday, November 6, 2015 at 10:33 AM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] migration error v1.3.0->v1.4+
Apologies for the misunderstanding. I was running a migration from AT & Archon to ASpace 1.3 using the new migration tool.
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.
Sorry I cannot be more helpful.
Thanks,
Phil
On Nov 6, 2015, at 9:16 AM, Joshua D. Shaw <Joshua.D.Shaw at dartmouth.edu<mailto:Joshua.D.Shaw at dartmouth.edu>> wrote:
Thanks Phil-
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?
Joshua
From: <Suda>, Phillip J
Reply-To: Archivesspace Users Group
Date: Friday, November 6, 2015 at 10:03 AM
To: Archivesspace Users Group
Subject: Re: [Archivesspace_Users_Group] migration error v1.3.0->v1.4+
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.
Thanks,
Phil
Phillip Suda
Systems Librarian
Howard-Tilton Memorial Library
Tulane University
psuda1 at tulane.edu<mailto:psuda1 at tulane.edu>
504-865-5607
On Nov 6, 2015, at 8:56 AM, Joshua D. Shaw <Joshua.D.Shaw at dartmouth.edu<mailto:Joshua.D.Shaw at dartmouth.edu>> wrote:
Hi all-
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.
Any thoughts as to what might be the cause? We (Dartmouth) may be extra special since we are running a bunch of plugins.
Thanks!
Joshua
Error:
#<Sequel::Error: Missing foreign key for [:repo_id]>
Missing foreign key for [:repo_id]
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:736:in `foreign_key_name'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/shared/mysql.rb:227:in `alter_table_op_sql'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:480:in `alter_table_sql_list'
org/jruby/RubyArray.java:1613:in `each'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:478:in `alter_table_sql_list'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/utils/split_alter_table.rb:35:in `apply_alter_table'
org/jruby/RubyArray.java:1613:in `each'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/utils/split_alter_table.rb:33:in `apply_alter_table'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:423:in `apply_alter_table_generator'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:79:in `alter_table'
/Applications/archivesspace-v140/lib/common.jar!/db/migrations/059_add_on_cascade_delete_to_repo_fk.rb:12:in `(root)'
org/jruby/RubyBasicObject.java:1574:in `instance_eval'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:100:in `apply'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:528:in `run'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:466:in `checked_transaction'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:527:in `run'
org/jruby/RubyArray.java:1613:in `each'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:524:in `run'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:391:in `run'
file:/Applications/archivesspace-v140/lib/common.jar!/db/db_migrator.rb:185:in `setup_database'
../scripts/rb/migrate_db.rb:43:in `(root)'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:69:in `connect'
/Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/core.rb:95:in `connect'
../scripts/rb/migrate_db.rb:28:in `(root)'
3
Sequel::Error: Missing foreign key for [:repo_id]
foreign_key_name at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:736
alter_table_op_sql at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/shared/mysql.rb:227
alter_table_sql_list at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:480
each at org/jruby/RubyArray.java:1613
alter_table_sql_list at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:478
apply_alter_table at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/utils/split_alter_table.rb:35
each at org/jruby/RubyArray.java:1613
apply_alter_table at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/adapters/utils/split_alter_table.rb:33
apply_alter_table_generator at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:423
alter_table at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/schema_methods.rb:79
(root) at /Applications/archivesspace-v140/lib/common.jar!/db/migrations/059_add_on_cascade_delete_to_repo_fk.rb:12
instance_eval at org/jruby/RubyBasicObject.java:1574
apply at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:100
run at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:528
checked_transaction at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:466
run at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:527
each at org/jruby/RubyArray.java:1613
run at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:524
run at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:391
setup_database at file:/Applications/archivesspace-v140/lib/common.jar!/db/db_migrator.rb:185
(root) at ../scripts/rb/migrate_db.rb:43
connect at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:69
connect at /Applications/archivesspace-v140/gems/gems/sequel-4.20.0/lib/sequel/core.rb:95
(root) at ../scripts/rb/migrate_db.rb:28
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
_______________________________________________
Archivesspace_Users_Group mailing list
Archivesspace_Users_Group at lyralists.lyrasis.org<mailto:Archivesspace_Users_Group at lyralists.lyrasis.org>
http://lyralists.lyrasis.org/mailman/listinfo/archivesspace_users_group
Phillip Suda
Systems Librarian
Howard-Tilton Memorial Library
Tulane University
psuda1 at tulane.edu<mailto:psuda1 at tulane.edu>
504-865-5607
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20151110/2cd6c106/attachment.html>
More information about the Archivesspace_Users_Group
mailing list