Class: CreateActionThrottlerLogs

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/tasks/migration/create_action_throttler_logs.rb

Class Method Summary collapse

Class Method Details

.downObject



14
15
16
# File 'lib/tasks/migration/create_action_throttler_logs.rb', line 14

def self.down
  drop_table :action_throttler_logs
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/tasks/migration/create_action_throttler_logs.rb', line 2

def self.up
  create_table :action_throttler_logs, :force => true do |t|
    t.string :scope
    t.string :reference
    t.timestamps
  end
	
  add_index :action_throttler_logs, :scope
  add_index :action_throttler_logs, :reference
  add_index :action_throttler_logs, [:scope, :reference]
end