Ruby on Rails: How do I add a not null constraint to an existing column using a migration?
You can also use change_column_null:
change_column_null :table_name, :column_name, false
For Rails 4+, nates' answer (using change_column_null) is better.
Pre-Rails 4, try change_column.
1) FIRST: Add column with default value
2) THEN: Remove default value
add_column :orders, :items, :integer, null: false, default: 0
change_column :orders, :items, :integer, default: nil