Class: CreateActionLogs
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateActionLogs
- Defined in:
- lib/generators/action_logger/templates/create_action_logs.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
16 17 18 |
# File 'lib/generators/action_logger/templates/create_action_logs.rb', line 16 def self.down drop_table :admin_notes end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/action_logger/templates/create_action_logs.rb', line 2 def self.up create_table :action_logs do |t| t.integer :sender_id t.string :sender_type t.string :action t.string :source t.string :ip t.text :data t.integer :admin_id t. end add_index :action_logs, [:sender_type, :sender_id] end |