impressionist/tests/test_app/db/migrate/20111127184039_create_widge...

16 lines
250 B
Ruby

class CreateWidgets < ActiveRecord::Migration
def self.up
create_table :widgets do |t|
t.string :name
t.integer :impressions_count, :default => 0
t.timestamps
end
end
def self.down
drop_table :widgets
end
end