Skip to content

Instantly share code, notes, and snippets.

@icemancast
Created December 4, 2012 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icemancast/4209136 to your computer and use it in GitHub Desktop.
Save icemancast/4209136 to your computer and use it in GitHub Desktop.
counts
class CreateCounts < ActiveRecord::Migration
def change
create_table :counts do |t|
t.string :item_id
t.text :count
t.timestamps
end
end
def selfdown
drop_table :counts
end
end
class CreateItems < ActiveRecord::Migration
def change
create_table :items do |t|
t.string :title
t.text :description
t.string :barcode
t.timestamps
end
end
def selfdown
drop_table :items
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment