Just to make it more clear, I started a new Rails project as described 
here:

http://rails.lighthouseapp.com/projects/8994/tickets/345-problems-with-mysql

> Lionel, just to run the whole thing cleanly, can you try doing rake
> db:drop db:create db:migrate db:test:prepare and then check schema.rb
> to see if it still wants to create an integer column even though your
> migration creates a decimal column?

This time I used 'rake db:test:prepare', as Rick said, and got the same 
results.

> When you said everything was ok when you specified the precision and
> scale in the migration, were you specifying :precision => 10, :scale
> => 0?

No. ':precision => 9, :scale => 2'. But I did the same test again, this 
time specifying ':precision => 10, :scale => 0' and, one more time, I 
got the same results. I think this could be something with MySQL or the 
communication between MySQL and Rails. I mean, DECIMAL(10,0) and 
BIGINT(10) differ only by the scale information and maybe this is 
confusing MySQL or Rails.

> Out of curiosity, (and I know it's the default, but) why would
> one want a decimal column with a scale of zero?

Just for testing purposes. I was going to put the constraints later. ;o)

PS: LEonel, not LIonel. ;oP

Thanks for your attention. ;oD
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to