Is :default allowed as an option for decimal columns?
A migration:
class CreateMoney < ActiveRecord::Migration
def self.up
create_table :money do |t|
t.decimal :amount, :defaut => 0.0, :precision => 8, :scale => 2
end
end
def self.down
drop_table :money
end
end
Creates the following schema:
create_table “money”, :force => true do |t|
t.decimal “amount”, :precision => 8, :scale => 2
end
What happened to the default, it’s gone!
Bug? or do decimal columns disallow the :default option? or is it
because :precision/:scale are also set?