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