class CreateProjects < ActiveRecord::Migration
def change
create_table :projects do |t|
t.string :title
t.boolean :complete
t.timestamps null: false
end
end
end
The complete field on the projects table should have a null: false to
avoid having to potentially handle three values for the field (true,
false, and null).
class CreateProjects < ActiveRecord::Migration
def change
create_table :projects do |t|
t.string :title
t.boolean :complete, null: false, default: false
t.timestamps null: false
end
end
end