Content
You are here:
Migration to 4.1 failed
Added by Deleted user over 9 years ago
Hi,
I have troubles migrating the database when updating from 4.0.10 to 4.1.
When I run:
RAILS_ENV=production bundle exec rake db:migrate
I get the follwing errors during migration of attachments:
rake aborted! StandardError: An error has occurred, all later migrations canceled: Validation failed: is too long (maximum is 104857600 characters)/usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/validations.rb:56:in `save!' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/attribute_methods/dirty.rb:33:in `save!' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:264:in `block in save!' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:208:in `transaction' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:311:in `with_transaction_returning_status' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:264:in `save!' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:103:in `migrate_attachment' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:44:in `block in up' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:42:in `each' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:42:in `each_with_index' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:42:in `up' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:410:in `block (2 levels) in migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:410:in `block in migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:389:in `migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:528:in `migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:720:in `block (2 levels) in migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:777:in `call' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:777:in `ddl_transaction' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:719:in `block in migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:700:in `each' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:700:in `migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:570:in `up' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:551:in `migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/railties/databases.rake:193:in `block (2 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval' /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>' ActiveRecord::RecordInvalid: Validation failed: is too long (maximum is 104857600 characters) /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/validations.rb:56:in `save!' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/attribute_methods/dirty.rb:33:in `save!' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:264:in `block in save!' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:208:in `transaction' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:311:in `with_transaction_returning_status' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/transactions.rb:264:in `save!' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:103:in `migrate_attachment' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:44:in `block in up' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:42:in `each' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:42:in `each_with_index' /usr/local/lib/openproject/db/migrate/20141215104802_migrate_attachments_to_carrier_wave.rb:42:in `up' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:410:in `block (2 levels) in migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:410:in `block in migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:in `with_connection' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:389:in `migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:528:in `migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:720:in `block (2 levels) in migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:777:in `call' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:777:in `ddl_transaction' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:719:in `block in migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:700:in `each' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:700:in `migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:570:in `up' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/migration.rb:551:in `migrate' /usr/local/rvm/gems/ruby-2.1.4/gems/activerecord-3.2.21/lib/active_record/railties/databases.rake:193:in `block (2 levels) in <top (required)>' /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval' /usr/local/rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>' Tasks: TOP => db:migrate
Anyone who knows what the problems is?
Replies (1)
Ok..
I managed to solve this. The problem was that I forgot to update the openproject-documents plugin to a 4.1 compatible version.