Hello everyone!
I want to add a column to a table. So here is my migration. My question
is : Is it possible to say that this value must be between 1 and 7 and
must no be a float (1.4 shouldn't be possible) ?
class AddValueToTable < ActiveRecord::Migration
def self.up
add_column :table, :value, :int
end
def self.down
remove_column :table, :value
end
end
Thank you for your help!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---