Project

General

Profile

Actions

Bug #8537

closed

Test database fails to create foreign keys on MySQL

Added by Dominic Cleal over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
Database
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Jenkins tests are failing, I think since foreigner 1.7.0 was released on MySQL.

+ bundle exec rake pkg:generate_source jenkins:unit TESTOPTS=-v
Your Gemfile lists the gem gettext (~> 3.1) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Your Gemfile lists the gem minitest (~> 4.7) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
rm -rf jenkins/reports/unit/
The Apipie cache is turned off. Enable it and run apipie:cache rake task to speed up API calls.
rake aborted!
ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1: ALTER TABLE `architectures_operatingsystems` ADD CONSTRAINT `architectures_operatingsystems_operatingsystem_id_fk` FOREIGN KEY (`operatingsystem_id`) REFERENCES `operatingsystems`(id) ,
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/mysql2_adapter.rb:213:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/foreigner-1.7.0/lib/foreigner/connection_adapters/sql2003.rb:24:in `add_foreign_key'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/migration.rb:466:in `block in method_missing'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/migration.rb:438:in `block in say_with_time'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/migration.rb:438:in `say_with_time'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/migration.rb:458:in `method_missing'
/var/lib/workspace/workspace/test_develop_pr_core/database/mysql/ruby/1.9.3/db/schema.rb:913:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/schema.rb:50:in `instance_eval'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/schema.rb:50:in `define'
/var/lib/workspace/workspace/test_develop_pr_core/database/mysql/ruby/1.9.3/db/schema.rb:14:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:245:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:245:in `block in load'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in `load_dependency'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:245:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/railties/databases.rake:402:in `block (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/railties/databases.rake:514:in `block (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/railties/databases.rake:494:in `block (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/gems/activerecord-3.2.21/lib/active_record/railties/databases.rake:559:in `block (3 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_develop_pr_core-1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:schema:load
Actions #1

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
Actions #3

Updated by Dominic Cleal over 10 years ago

  • Status changed from Assigned to Resolved

Resolved in foreigner 1.7.1.

Actions

Also available in: Atom PDF