Class: CreateChangesets

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/yesterday/templates/create_changesets.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/generators/yesterday/templates/create_changesets.rb', line 13

def self.down
  drop_table :changesets
end

.upObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/yesterday/templates/create_changesets.rb', line 2

def self.up
  create_table :changesets do |t|
    t.integer :changed_object_id
    t.string :changed_object_type
    t.text :object_attributes
    t.integer :version_number
    t.datetime :created_at
    t.datetime :updated_at
  end
end