4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/rails/generators/google/model/templates/create_google_safe_browsing_shavar.rb', line 4
def up
create_table :google_safe_browsing_shavars do |t|
t.integer :chunk_num
t.string :chunk_type, :limit => 1 t.string :host_key
t.integer :add_chunk_num t.string :prefix
t.integer :google_safe_browsing_list_id end
add_index :google_safe_browsing_shavars, [:chunk_type, :host_key], :name => 'index_chunk_type_host'
add_index :google_safe_browsing_shavars, [:chunk_type, :host_key, :prefix], :name => 'index_chunk_type_host_prefix'
add_index :google_safe_browsing_shavars, [:chunk_type, :add_chunk_num, :host_key, :prefix], :name => 'index_add_chunk_host_prefix'
add_index :google_safe_browsing_shavars, \
[:google_safe_browsing_list_id, :chunk_type, :chunk_num, :host_key, :add_chunk_num, :prefix], :unique => true, :name => 'index_chunk_host_prefix'
end
|