Class: Cheat::Models::SetUpUsTheCheat

Inherits:
V
  • Object
show all
Defined in:
lib/cheat/site.rb

Class Method Summary collapse

Class Method Details

.downObject



61
62
63
64
# File 'lib/cheat/site.rb', line 61

def self.down
  drop_table :cheat_sheets
  Sheet.drop_versioned_table
end

.upObject



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/cheat/site.rb', line 50

def self.up
  create_table :cheat_sheets, :force => true do |t|
    t.column :id,         :integer,   :null => false
    t.column :title,      :string,    :null => false
    t.column :body,       :text
    t.column :created_at, :datetime,  :null => false
    t.column :updated_at, :datetime,  :null => false
  end
  Sheet.create_versioned_table
  Sheet.reset_column_information
end