upgrade redmine-2.2.2 to redmine-3.4.2
Added by mor diop over 6 years ago
Bonjour,
je procedais à la mise à jour de redmine-2.2.2 vers redmine-3.4.2 et en suivant les scripts qui se trouve dans le forum et une fois arrivé là
bundle exec rake redmine:plugins:migrate RAILS_ENV=production
ça m'affiche cet erreur
"Migrating latest_issues (Latest Issues plugin)...
Migrating redmine_custom_workflows (Redmine Custom Workflow plugin)...
20120628060102 ChangeCustomWorkflowsDescriptionType: migrating ===========
-- change_column(:custom_workflows, :description, :text, {:null=>false, :default=>""})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: BLOB/TEXT column 'description' can't have a default value: ALTER TABLE `custom_workflows` CHANGE `description` `description` text DEFAULT '' NOT NULL
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `block in query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `handle_interrupt'
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `query'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `block in execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/var/lib/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:225:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:531:in `change_column'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:665:in `block in method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `block in say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in `method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:in `method_missing'
/var/www/redmine-3.4.2/plugins/redmine_custom_workflows/db/migrate/20120628060102_change_custom_workflows_description_type.rb:3:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:571:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:611:in `exec_migration'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:591:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:590:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:1046:in `ddl_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `each'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in `migrate'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:481:in `migrate_plugin'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:453:in `migrate'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:467:in `block in migrate'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:466:in `each'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:466:in `migrate'
/var/www/redmine-3.4.2/lib/tasks/redmine.rake:135:in `block (3 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Caused by:
ActiveRecord::StatementInvalid: Mysql2::Error: BLOB/TEXT column 'description' can't have a default value: ALTER TABLE `custom_workflows` CHANGE `description` `description` text DEFAULT '' NOT NULL
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `block in query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `handle_interrupt'
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `query'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `block in execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/var/lib/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:225:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:531:in `change_column'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:665:in `block in method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `block in say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in `method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:in `method_missing'
/var/www/redmine-3.4.2/plugins/redmine_custom_workflows/db/migrate/20120628060102_change_custom_workflows_description_type.rb:3:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:571:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:611:in `exec_migration'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:591:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:590:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:1046:in `ddl_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `each'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in `migrate'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:481:in `migrate_plugin'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:453:in `migrate'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:467:in `block in migrate'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:466:in `each'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:466:in `migrate'
/var/www/redmine-3.4.2/lib/tasks/redmine.rake:135:in `block (3 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Caused by:
Mysql2::Error: BLOB/TEXT column 'description' can't have a default value
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `_query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:120:in `block in query'
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `handle_interrupt'
/var/lib/gems/2.3.0/gems/mysql2-0.4.10/lib/mysql2/client.rb:119:in `query'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `block in execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in `block in log'
/var/lib/gems/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in `log'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:225:in `execute'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:531:in `change_column'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:665:in `block in method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `block in say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in `say_with_time'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in `method_missing'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:416:in `method_missing'
/var/www/redmine-3.4.2/plugins/redmine_custom_workflows/db/migrate/20120628060102_change_custom_workflows_description_type.rb:3:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:571:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:611:in `exec_migration'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:592:in `block (2 levels) in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:591:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:590:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:998:in `block in execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:1046:in `ddl_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in `execute_migration_in_transaction'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in `block in migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `each'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in `migrate'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in `up'
/var/lib/gems/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in `migrate'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:481:in `migrate_plugin'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:453:in `migrate'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:467:in `block in migrate'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:466:in `each'
/var/www/redmine-3.4.2/lib/redmine/plugin.rb:466:in `migrate'
/var/www/redmine-3.4.2/lib/tasks/redmine.rake:135:in `block (3 levels) in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => redmine:plugins:migrate
(See full trace by running task with --trace)
utilisateur@debian:/var/www/redmine-3.4.2$
"..
est ce que quelqu'un aurai une idée de ce que c'est? a parement c'est ça mais j'ai rien compris
Mysql2::Error: BLOB/TEXT column 'description' can't have a default value: ALTER TABLE `custom_workflows` CHANGE `description` `description` text DEFAULT '' NOT NULL"
Replies (2)
RE: upgrade redmine-2.2.2 to redmine-3.4.2 - Added by Martin Denizet (redmine.org team member) over 6 years ago
Please try that:
- Edit
/var/www/redmine-3.4.2/plugins/redmine_custom_workflows/db/migrate/20120628060102_change_custom_workflows_description_type.rb
- Modify such as:
def self.up - change_column :custom_workflows, :description, :text, :null => true, :default => nil + change_column :custom_workflows, :description, :text, :null => true end
- Try your migration again
If you cannot find a solution to that, you could eventually remove the plugin causing the issue (redmine_custom_workflows
)
Let me know how it went,
Cheers,
RE: upgrade redmine-2.2.2 to redmine-3.4.2 - Added by mor diop over 6 years ago
ça a passer le soucis est que les plugins sont incompatibles avec la version redmine-3.4.2.
j'ai supprimer tous les plugins et le processus de migration a passé.