Class: CreateEventRecords

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/stonepath/event_log/templates/create_event_records.rb

Class Method Summary collapse

Class Method Details

.downObject



14
15
16
# File 'lib/generators/stonepath/event_log/templates/create_event_records.rb', line 14

def self.down    
  drop_table :event_records
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/generators/stonepath/event_log/templates/create_event_records.rb', line 2

def self.up
  create_table :event_records do |t|
    
    t.references :auditable, :polymorphic => true
    t.string :event_name
    t.string :old_state_name
    t.string :new_state_name
    t.integer :user_id  #This will rely on the acl controller hack
    t.timestamps
  end
end