ActiveRecord migrations:
*Forbid null values
To forbid null values in your table columns, add the :null parameter to your migration, like this:
class AddPriceToProducts < ActiveRecord::Migration
def change
add_column :products, :float, null: false
end
end