Error on migrate database
Added by Sebastian Kruse over 9 years ago
I have just tried to upgrade my 2.5 Redmine to 3.0. All works fine but the database migation failed. What is to do?
Edit: Without DB migation I got errors if I try to view a ticket or a user.
Here the Error text:
root@Redmine-System:/usr/share/redmine# bundle exec rake db:migrate RAILS_ENV=production == 20120930112914 AddJournalsPrivateNotes: migrating ========================== -- add_column(:journals, :private_notes, :boolean, {:default=>false, :null=>false}) rake aborted! StandardError: An error has occurred, all later migrations canceled: Mysql2::Error: Duplicate column name 'private_notes': ALTER TABLE `journals` ADD `private_notes` tinyint(1) DEFAULT 0 NOT NULL/var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `query' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `block in execute' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /var/lib/gems/1.9.1/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:299:in `execute' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/mysql2_adapter.rb:231:in `execute' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:393:in `add_column' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:662:in `block in method_missing' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:632:in `block in say_with_time' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:632:in `say_with_time' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:652:in `method_missing' /usr/share/redmine/db/migrate/20120930112914_add_journals_private_notes.rb:3:in `up' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:609:in `exec_migration' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:590:in `block (2 levels) in migrate' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:589:in `block in migrate' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:588:in `migrate' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:765:in `migrate' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:995:in `block in execute_migration_in_transaction' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:1043:in `ddl_transaction' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:994:in `execute_migration_in_transaction' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:956:in `block in migrate' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:952:in `each' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:952:in `migrate' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:820:in `up' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:798:in `migrate' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/tasks/database_tasks.rb:137:in `migrate' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>' Tasks: TOP => db:migrate (See full trace by running task with --trace)
Replies (1)
RE: Error on migrate database - Added by Leonel Iturralde over 9 years ago
Hi,
Take a look at this post RE: Redmine 3.0.1 from 2.6.0