2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-15 17:10:45 -04:00
|
|
|
class CreateWebCrawlerRequests < ActiveRecord::Migration[5.1]
|
|
|
|
def change
|
|
|
|
create_table :web_crawler_requests do |t|
|
|
|
|
t.date :date, null: false
|
|
|
|
t.string :user_agent, null: false
|
|
|
|
t.integer :count, null: false, default: 0
|
|
|
|
end
|
|
|
|
|
|
|
|
add_index :web_crawler_requests, [:date, :user_agent], unique: true
|
|
|
|
end
|
|
|
|
end
|