class BuildDb < ActiveRecord::Migration
  def self.up
    create_table :items do |t|
      t.column :name,         :string
      t.column :description,  :text
    end
    create_table :photos do |t|
      t.column :item_id,      :integer
      t.column :name,         :string
      t.column :content_type, :string
      t.column :data,         :binary
      t.column :thumb,        :binary
    end
  end

  def self.down
    drop_table :photos
    drop_table :items
  end
end