Alternative to :decimal column type for migrations?

Hi,
I’m reading Agile Web D. 2nd Edition and I’m following along
by doing the sample application ‘depot’ on my Linux machine. In one of
their migrate scripts, they use the following line of code:
add_column :products, :price, :decimal, :precision => 8, :scale => 2,
:default => 0

They note in the book that :decimal won’t exist as a column type until
Rails 1.2… which isn’t installed on my machine. What is the
alternative, pre Rails 1.2 syntax for making a decimal column with
precision 8 and scale 2?

Thank you,
– C

Drop tp SQL with execute.

On 9/19/06, Christopher J. Bottaro [email protected] wrote:

alternative, pre Rails 1.2 syntax for making a decimal column with
precision 8 and scale 2?

Thank you,
– C


When a man says he approves of something in principle, it means he
hasn’t the slightest intention of putting it into practice. –
Bismarck

On 9/20/06, Michael C. [email protected] wrote:

Drop tp SQL with execute.

Or upgrade to edge.

Isak

Thanks, that worked… :slight_smile:

–C

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs