[Archivesspace_Users_Group] migration error v1.3.0->v1.4+

Joshua D. Shaw Joshua.D.Shaw at dartmouth.edu
Fri Nov 6 09:56:45 EST 2015


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20151106/501f24d7/attachment.html>


More information about the Archivesspace_Users_Group mailing list