Class: CreateSafetynetHistories

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/rails/generators/safetynet/templates/db/migrate/1_create_safetynet_histories.rb

Class Method Summary collapse

Class Method Details

.downObject



13
14
15
# File 'lib/rails/generators/safetynet/templates/db/migrate/1_create_safetynet_histories.rb', line 13

def self.down
  drop_table :safetynet_histories
end

.upObject



2
3
4
5
6
7
8
9
10
11
# File 'lib/rails/generators/safetynet/templates/db/migrate/1_create_safetynet_histories.rb', line 2

def self.up
  create_table :safetynet_histories do |t|
    t.string :address
    t.string :channel
    t.string :method
    t.datetime :created_at
  end

  add_index :safetynet_histories, [:address, :channel, :method, :created_at], name: 'safetynet_histories_idx'
end