big_integer fails migration
Reported by Bryan Larsen | April 6th, 2009 @ 06:23 PM | in Hobo 1.0 - Final
If you try and add a big_integer to your fields definition:
$ script/generate hobo_migration
uninitialized constant String::COLUMN_TYPE
I hacked a rescue clause into the migration to get this
backtrace:
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:102:in
const_missing_before_generators'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails_generator/lookup.rb:15:in
const_missing'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/field_spec.rb:28:in
sql_type'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/field_spec.rb:54:in
same_type?'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/field_spec.rb:65:in
different_to?'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:249:in
change_table'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:245:in
each'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:245:in
change_table'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:178:in
generate'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:174:in
each'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/lib/hobo_fields/migration_generator.rb:174:in
generate'
/home/blarsen/dev/agility-master/vendor/plugins/hobo/hobofields/rails_generators/hobo_migration/hobo_migration_generator.rb:34:in
manifest'
/usr/lib/ruby/1.8/delegate.rb:300:in __send__'
/usr/lib/ruby/1.8/delegate.rb:300:in
manifest'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails_generator/commands.rb:42:in
invoke!'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/rails_generator/scripts/../scripts.rb:31:in
run'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/generate.rb:6
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in
require'
script/generate:3
I hacked this into fix_native_types:
types[:big_integer] = types[:decimal]
but I'm fairly sure that's wrong.
Perhaps big_integer is supposed to be a Bignum instead of BigDecimal?
Comments and changes to this ticket
-
Bryan Larsen April 9th, 2009 @ 12:27 PM
- Milestone set to Hobo 1.0 - Final
-
Bryan Larsen April 9th, 2009 @ 12:30 PM
- Tag changed from hobofields to defect, hobofields
- State changed from new to open
-
Bryan Larsen May 13th, 2009 @ 01:54 PM
- State changed from open to resolved
big_integer support has been dropped.
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 ยป