Skip to content

Instantly share code, notes, and snippets.

@devton
Created February 10, 2015 22:20
Show Gist options
  • Save devton/f3d4ccd411fdbd337baa to your computer and use it in GitHub Desktop.
Save devton/f3d4ccd411fdbd337baa to your computer and use it in GitHub Desktop.
CrawledUrlsTable
class CreateCrawledUrls < ActiveRecord::Migration
def change
create_table :crawled_urls do |t|
t.string :url_scheme, null: false
t.text :host, null: false
t.text :path, null: false
t.text :fragment
t.text :query_strings
t.datetime :last_parsed_at
t.datetime :last_check_at
t.boolean :dead, default: false, null: false
t.timestamps null: false
end
add_index :crawled_urls, :host
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment