hobo_migration dropping id column broken
Reported by Betelgeuse | March 9th, 2010 @ 07:25 PM | in Hobo 1.1
Add set_primary_key false to a model and try running the hobo_migration generator
betelgeuse@pena ~/hobo/hobo-loop $ ./script/generate hobo_migration -t
DROP, RENAME or KEEP?: column models.id
Rename choices: false
Enter either 'drop id' or one of the rename choices or press enter to keep: drop id
undefined method `position' for nil:NilClass
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/whiny_nil.rb:52:in `method_missing'
/usr/lib/ruby/gems/1.8/gems/hobofields-1.0.0/lib/hobo_fields/migration_generator.rb:307:in `change_table'
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `sort_by'
/usr/lib/ruby/gems/1.8/gems/hobofields-1.0.0/lib/hobo_fields/migration_generator.rb:307:in `each'
/usr/lib/ruby/gems/1.8/gems/hobofields-1.0.0/lib/hobo_fields/migration_generator.rb:307:in `sort_by'
/usr/lib/ruby/gems/1.8/gems/hobofields-1.0.0/lib/hobo_fields/migration_generator.rb:307:in `change_table'
/usr/lib/ruby/gems/1.8/gems/hobofields-1.0.0/lib/hobo_fields/migration_generator.rb:242:in `generate'
/usr/lib/ruby/gems/1.8/gems/hobofields-1.0.0/lib/hobo_fields/migration_generator.rb:238:in `each'
/usr/lib/ruby/gems/1.8/gems/hobofields-1.0.0/lib/hobo_fields/migration_generator.rb:238:in `generate'
/usr/lib/ruby/gems/1.8/gems/hobofields-1.0.0/rails_generators/hobo_migration/hobo_migration_generator.rb:33:in `manifest'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/commands.rb:42:in `invoke!'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails_generator/scripts/../scripts.rb:31:in `run'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/generate.rb:6
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
./script/generate:3
Comments and changes to this ticket
-
Owen May 29th, 2010 @ 12:59 AM
- Milestone set to Hobo 1.0X
- State changed from new to open
- Assigned user set to Bryan Larsen
Any updates?
-
Bryan Larsen November 15th, 2010 @ 05:48 PM
- Tag changed from hobo_migration, migration-generator to hobo_migration, migration-generator, needs-test-case
- Milestone order changed from 0 to 0
-
Bryan Larsen November 15th, 2010 @ 05:52 PM
- Milestone changed from Hobo 1.0X to Hobo 1.1
- Milestone order changed from 4 to 0
-
Betelgeuse December 11th, 2010 @ 01:38 PM
- Tag changed from hobo_migration, migration-generator, needs-test-case to hobo_migration, migration-generator
Is there still in 1.3.
DROP, RENAME or KEEP?: column things.id Rename choices: false Enter either 'drop id' or one of the rename choices or press enter to keep: drop id => "drop id" /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `position' for nil:NilClass (NoMethodError) from /usr/local/lib/ruby/gems/1.8/gems/hobo_fields-1.3.0.pre23/lib/generators/hobo/migration/migrator.rb:316:in `change_table' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:193:in `sort_by'
The model
class Pivot < ActiveRecord::Base hobo_model set_primary_key false fields do end belongs_to :a belongs_to :b index [:a_id, :b_id], :unique => true end
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป