Sha256: 6c6fc3f0532f38d14cb8b02ddd17210a5e12e7d1abe6e7ffe97b11e56e08e0de

Contents?: true

Size: 394 Bytes

Versions: 1

Compression:

Stored size: 394 Bytes

Contents

class CreateActionAuditorTable < ActiveRecord::Migration
  def self.up
    create_table :logged_actions do |t|
      t.belongs_to :scope, :polymorphic => true
      t.text       :message
      t.text       :parameters
      t.timestamp  :created_at
    end

    add_index :logged_actions, [ :scope_type, :scope_id, :created_at ]
  end
  
  def self.down
    drop_table :logged_actions
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
action_auditor-0.1.0 generators/action_auditor_migration/templates/migration.rb