Project

General

Profile

Actions

Bug #5480

closed

Extend user role migration fails on Mysql

Added by Stephen Benjamin almost 10 years ago. Updated almost 10 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
DB migrations
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

User was on IRC and reported this problem, and another on the mailing list:
https://groups.google.com/forum/#!topic/foreman-users/ADNvk4rypYg

Mysql2::Error: Error on rename of './puppet/user_roles' to './puppet/#sql2-277-9' (errno: 152): ALTER TABLE `user_roles` DROP FOREIGN KEY `user_roles_user_id_fk`
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `query'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:245:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:211:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/foreigner-1.4.2/lib/foreigner/connection_adapters/sql2003.rb:39:in `remove_foreign_key'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:466:in `block in method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:438:in `block in say_with_time'
/opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:280:in `measure'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:438:in `say_with_time'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:458:in `method_missing'
/usr/share/foreman/db/migrate/20131114084718_extend_user_role.rb:3:in `up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in `block (2 levels) in migrate'
/opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:280:in `measure'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in `block in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:123:in `with_connection'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:389:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:528:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:777:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:777:in `ddl_transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:719:in `block in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:570:in `up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:551:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:153:in `block (2 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `blockmig (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
Tasks: TOP => db:migrate

Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #5427: Issuing rake tasks for update from 1.4 to 1.5 failsClosedDominic Cleal04/24/2014Actions
Actions #1

Updated by Stephen Benjamin almost 10 years ago

  • Category set to DB migrations
Actions #2

Updated by Stephen Benjamin almost 10 years ago

  • Subject changed from Extend user role migration fails on Mysql2 to Extend user role migration fails on Mysql
Actions #3

Updated by Dominic Cleal almost 10 years ago

  • Is duplicate of Bug #5427: Issuing rake tasks for update from 1.4 to 1.5 fails added
Actions #4

Updated by Dominic Cleal almost 10 years ago

  • Status changed from New to Duplicate
Actions

Also available in: Atom PDF