Class: AppmospheresAuditMigration
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- AppmospheresAuditMigration
- Defined in:
- lib/generators/appmospheres_audit/templates/active_record/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
20 21 22 |
# File 'lib/generators/appmospheres_audit/templates/active_record/migration.rb', line 20 def self.down drop_table :event_logs end |
.up ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/generators/appmospheres_audit/templates/active_record/migration.rb', line 3 def self.up create_table :event_logs do |t| t.string :event_type t.string :action t.text :payload t.datetime :reported_at t. end add_index :event_logs, :event_type add_index :event_logs, :action add_index :event_logs, :reported_at end |