class Item < ActiveRecord::Migration def self.up create_table :items do |table| # Item to do name table.column :name, :string # Item's due date table.column :due, :datetime # Item's description table.column :description, :text # Category it is a part of (Note: Category has_many :items and Item belongs_to :categories) table_column :category_id, :integer end end def self.down # Drop the table drop_table :items end end