Answer the question
In order to leave comments, you need to log in
Is it possible to migrate Redmine 2.1.4 to 3.0?
Hello everyone, the next question raised a new server trying to transfer Redmine and immediately update.
== 20130602092539 CreateQueriesRoles: migrating ===============================
-- create_table(:queries_roles, {:id=>false})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: Table 'queries_roles' already exists: CREATE TABLE `queries_roles` (`query_id` int(11) NOT NULL, `role_id` int(11) NOT NULL) ENGINE=InnoDB/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `query'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `block in execute'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:466:in `block in log'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:460:in `log'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `execute'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:231:in `execute'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:206:in `create_table'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:462:in `create_table'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:662:in `block in method_missing'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:632:in `block in say_with_time'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:632:in `say_with_time'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:652:in `method_missing'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:417:in `method_missing'
/home/redmine/redmine/db/migrate/20130602092539_create_queries_roles.rb:3:in `up'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:569:in `up'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:609:in `exec_migration'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:590:in `block (2 levels) in migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:589:in `block in migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:588:in `migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:765:in `migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:1043:in `ddl_transaction'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:994:in `execute_migration_in_transaction'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:956:in `block in migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:952:in `each'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:952:in `migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:820:in `up'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:798:in `migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'queries_roles' already exists: CREATE TABLE `queries_roles` (`query_id` int(11) NOT NULL, `role_id` int(11) NOT NULL) ENGINE=InnoDB
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `query'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `block in execute'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:466:in `block in log'
/usr/local/rvm/gems/ruby-2.1.5/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:460:in `log'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `execute'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/mysql2_adapter.rb:231:in `execute'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/schema_statements.rb:206:in `create_table'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:462:in `create_table'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:662:in `block in method_missing'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:632:in `block in say_with_time'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:632:in `say_with_time'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:652:in `method_missing'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:417:in `method_missing'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:820:in `up'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/migration.rb:798:in `migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/usr/local/rvm/gems/ruby-2.1.5/gems/activerecord-4.2.0/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
/usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Answer the question
In order to leave comments, you need to log in
RM is trying to run a migration that has actually already been run. The easiest way is not to figure out why the migration is repeated, but simply delete it (the migration, not the table, after making sure that it does not add anything new to the already existing table).
You can remove the migration by digging into the db directory.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question