[Archivesspace_Users_Group] migration error v1.3.0->v1.4+
Suda, Phillip J
psuda1 at tulane.edu
Fri Nov 6 10:33:51 EST 2015
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/20151106/8603d770/attachment.html>
More information about the Archivesspace_Users_Group
mailing list