Defect #10320

db migrate "ChangeAttachmentsContainerDefaults" error

Added by Toshi MARUYAMA over 5 years ago. Updated over 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Database
Target version:-
Resolution:Fixed Affected version:1.4.4

Description

trunk r8991 on Ruby 1.9.3-p125

==  ChangeAttachmentsContainerDefaults: migrating =============================
-- change_column(:attachments, :container_id, :integer, {:default=>nil, :null=>true})
   -> 0.2494s
-- change_column(:attachments, :container_type, :string, {:limit=>30, :default=>nil, :null=>true})
   -> 0.4275s
==  ChangeAttachmentsContainerDefaults: migrated (0.6874s) ====================

/home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: db:migrate (ArgumentError)
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:146:in `map!'
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:146:in `non_options'
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:207:in `non_options'
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:52:in `process_args'
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run'
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:21:in `run'
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
    from /home/xxxxxxx/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun'

Rails 3.1.3 and Ruby 1.8.7-p357

==  ChangeAttachmentsContainerDefaults: migrating =============================
-- change_column(:attachments, :container_id, :integer, {:null=>true, :default=>nil})
rake aborted!
An error has occurred, this and all later migrations canceled:

Index name 'temp_index_altered_attachments_on_container_id_and_container_type'
on table 'altered_attachments' is too long; the limit is 64 characters


Related issues

Related to Redmine - Defect #10818: Running rake in test environment causes exception Closed

Associated revisions

Revision 8996
Added by Jean-Philippe Lang over 5 years ago

Fixed migration broken with Rails 3.1.3 (#10320).

Revision 10137
Added by Toshi MARUYAMA about 5 years ago

Gemfile: prevent "rake db:migrate RAILS_ENV=test" causes exception on Ruby 1.9.3 (#10320, #10818)

Revision 10138
Added by Toshi MARUYAMA about 5 years ago

Merged r10137 from trunk to 2.0-stable (#10320, #10818)

Gemfile: prevent "rake db:migrate RAILS_ENV=test" causes exception on Ruby 1.9.3.

Revision 10139
Added by Toshi MARUYAMA about 5 years ago

Merged r10137 from trunk to 1.4-stable (#10320, #10818)

Gemfile: prevent "rake db:migrate RAILS_ENV=test" causes exception on Ruby 1.9.3.

Revision 11325
Added by Toshi MARUYAMA over 4 years ago

remove "test-unit" from Gemfile

This is added by r10137 (#10320, #10818) and shoulda version was upgraded by r11324.

History

#1 Updated by Jean-Philippe Lang over 5 years ago

Toshi MARUYAMA wrote:

trunk r8991 on Ruby 1.9.3-p125

[...]

Not related to this migration. Even if you remove it, you'll get the same error et the end of db:migrate.
The stack trace is odd and the migration is actually executed fine. I can't see the problem in Redmine.

Rails 3.1.3 and Ruby 1.8.7-p357

[...]

Fixed in r8996, although it should be fixed on the rails side.

#2 Updated by Etienne Massip over 5 years ago

  • Category set to Database

#3 Updated by Etienne Massip about 5 years ago

  • Target version set to 2.0.4
  • Affected version (unused) changed from devel to 2.0.3
  • Affected version set to 2.0.3

#4 Updated by Toshi MARUYAMA about 5 years ago

  • Affected version (unused) changed from 2.0.3 to 1.4.4
  • Affected version changed from 2.0.3 to 1.4.4

#5 Updated by Toshi MARUYAMA about 5 years ago

  • Subject changed from db migrate "ChangeAttachmentsContainerDefaults" error on SQLite3 1.3.5 to db migrate "ChangeAttachmentsContainerDefaults" error

#6 Updated by Toshi MARUYAMA about 5 years ago

  • Status changed from New to Closed
  • Target version deleted (2.0.4)
  • Resolution set to Fixed

Description has two problems.
First problem is duplicate with #10818.

#7 Updated by Lawrence Krubner over 4 years ago

I am still getting this error:

Rails 3.2.11
Ruby 1.9.3
Centos 6.3
Redmine 2.2 from SVN on February 05, 2013

#8 Updated by Toshi MARUYAMA over 4 years ago

Lawrence Krubner wrote:

I am still getting this error:

Description has two problems.
Which error?

Also available in: Atom PDF