Forbid null values

suggest change

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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


ActiveRecord migrations:
* Forbid null values

Table Of Contents
3 Views
4 ActiveRecord migrations
19 Caching
23 Rails 5
25 Mongoid
26 Gems
55 CSV