Class: CreateGoogleSafeBrowsingFullHashes

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/rails/generators/google/model/templates/create_google_safe_browsing_full_hashes.rb

Class Method Summary collapse

Class Method Details

.downObject



16
17
18
# File 'lib/rails/generators/google/model/templates/create_google_safe_browsing_full_hashes.rb', line 16

def down
  drop_table :google_safe_browsing_full_hashes
end

.upObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/rails/generators/google/model/templates/create_google_safe_browsing_full_hashes.rb', line 4

def up
  create_table :google_safe_browsing_full_hashes do |t|
    t.string :value   # 32 Bytes
    t.integer :add_chunk_num
    t.integer :google_safe_browsing_list_id
    t.timestamps
  end

  add_index :google_safe_browsing_full_hashes, :value, :name => 'index_full_hashes'

end