# This file is autogenerated. Instead of editing this file, please use the
# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.

ActiveRecord::Schema.define(:version => 4) do

  create_table "flags", :force => true do |t|
    t.column "resource_id", :integer
    t.column "submit_user_id", :integer
    t.column "flag_type", :string
    t.column "comment", :text
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "resource_version", :integer
  end

  create_table "legacy", :force => true do |t|
    t.column "auth", :text
    t.column "date_updated", :integer
    t.column "hits", :integer, :default => 0
    t.column "outclicks", :integer, :default => 0
    t.column "name", :text
    t.column "org", :text
    t.column "byline", :text
    t.column "keywords", :text
    t.column "rtype", :text
    t.column "project_url", :text
    t.column "description", :text
    t.column "contact_other", :text
    t.column "contact_email", :text
    t.column "contact_name", :text
    t.column "public_settings", :text
    t.column "entry_disabled", :integer, :default => 0
    t.column "stage", :text
    t.column "commercial", :text
    t.column "commercial_url", :text
    t.column "cost", :text
    t.column "int_userbase", :integer
    t.column "license", :text
    t.column "int_developers", :integer
    t.column "int_publications", :integer
    t.column "tech_pubs", :text
    t.column "appl_pubs", :text
    t.column "year_started", :integer
    t.column "size_scale", :text
    t.column "support", :text
    t.column "mailing_list_url", :text
    t.column "documentation_url", :text
    t.column "os_support", :text
  end

  add_index "legacy", ["name"], :name => "legacy_name_key", :unique => true

  create_table "licenses", :force => true do |t|
    t.column "name", :string, :limit => 100
    t.column "description", :text
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "orgs", :force => true do |t|
    t.column "name", :string, :limit => 250
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "orgs_resources", :id => false, :force => true do |t|
    t.column "org_id", :integer
    t.column "resource_id", :integer
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "os_supports", :force => true do |t|
    t.column "name", :string, :limit => 100
    t.column "description", :text
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "permissions", :force => true do |t|
    t.column "user_id", :integer
    t.column "name", :string, :limit => 40
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "rating_comments", :force => true do |t|
    t.column "title", :string, :limit => 100
    t.column "comment", :text
    t.column "rating_id", :integer
    t.column "user_id", :integer
    t.column "parent_id", :integer
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "ratings", :force => true do |t|
    t.column "score", :integer
    t.column "comment", :text
    t.column "user_id", :integer
    t.column "rateable_type", :string, :limit => 30
    t.column "rateable_id", :integer
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "relatedness", :id => false, :force => true do |t|
    t.column "resource_id", :integer
    t.column "related_id", :integer
  end

  create_table "resource_types", :force => true do |t|
    t.column "name", :string, :limit => 100
    t.column "description", :text
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "resource_versions", :force => true do |t|
    t.column "resource_id", :integer
    t.column "version", :integer
    t.column "name", :string, :limit => 100
    t.column "byline", :string, :limit => 200
    t.column "project_url", :string, :limit => 200
    t.column "description", :text
    t.column "contact_name", :string, :limit => 200
    t.column "contact_email", :string, :limit => 100
    t.column "contact_other", :text
    t.column "contact_name_public", :boolean
    t.column "contact_email_public", :boolean
    t.column "contact_other_public", :boolean
    t.column "mailing_list_url", :string, :limit => 200
    t.column "documentation_url", :string, :limit => 200
    t.column "auth_key", :string, :limit => 18
    t.column "hits", :integer, :default => 0
    t.column "outclicks", :integer, :default => 0
    t.column "year_started", :date
    t.column "resource_type_id", :integer
    t.column "viewable", :boolean, :default => false
    t.column "stage_id", :integer
    t.column "userbase", :integer
    t.column "developers", :integer
    t.column "license_id", :integer
    t.column "os_support_id", :integer
    t.column "size_scale_id", :integer
    t.column "support_id", :integer
    t.column "commercial", :string
    t.column "commercial_url", :string, :limit => 200
    t.column "cost", :string
    t.column "publications", :integer
    t.column "tech_publications", :text
    t.column "appl_publications", :text
    t.column "superceded_id", :integer
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "resources", :force => true do |t|
    t.column "name", :string, :limit => 100
    t.column "byline", :string, :limit => 200
    t.column "project_url", :string, :limit => 200
    t.column "description", :text
    t.column "contact_name", :string, :limit => 200
    t.column "contact_email", :string, :limit => 100
    t.column "contact_other", :text
    t.column "contact_name_public", :boolean
    t.column "contact_email_public", :boolean
    t.column "contact_other_public", :boolean
    t.column "mailing_list_url", :string, :limit => 200
    t.column "documentation_url", :string, :limit => 200
    t.column "auth_key", :string, :limit => 18
    t.column "hits", :integer, :default => 0
    t.column "outclicks", :integer, :default => 0
    t.column "year_started", :date
    t.column "resource_type_id", :integer
    t.column "viewable", :boolean, :default => false
    t.column "stage_id", :integer
    t.column "userbase", :integer
    t.column "developers", :integer
    t.column "license_id", :integer
    t.column "os_support_id", :integer
    t.column "size_scale_id", :integer
    t.column "support_id", :integer
    t.column "commercial", :string
    t.column "commercial_url", :string, :limit => 200
    t.column "cost", :string
    t.column "publications", :integer
    t.column "tech_publications", :text
    t.column "appl_publications", :text
    t.column "superceded_id", :integer
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "version", :integer, :default => 1
  end

  create_table "roles", :force => true do |t|
    t.column "name", :string, :limit => 40
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
    t.column "authorizable_type", :string, :limit => 30
    t.column "authorizable_id", :integer
  end

  create_table "roles_users", :id => false, :force => true do |t|
    t.column "role_id", :integer
    t.column "user_id", :integer
  end

  create_table "similarity", :id => false, :force => true do |t|
    t.column "resource_id", :integer
    t.column "similar_id", :integer
  end

  create_table "size_scales", :force => true do |t|
    t.column "name", :string, :limit => 100
    t.column "description", :text
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "stages", :force => true do |t|
    t.column "name", :string, :limit => 100
    t.column "description", :text
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "supports", :force => true do |t|
    t.column "name", :string, :limit => 100
    t.column "description", :text
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "taggings", :id => false, :force => true do |t|
    t.column "tag_id", :integer
    t.column "resource_id", :integer
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "tags", :force => true do |t|
    t.column "name", :string, :limit => 100
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

  create_table "users", :force => true do |t|
    t.column "login", :string, :limit => 40
    t.column "email", :string, :limit => 100
    t.column "crypted_password", :string, :limit => 40
    t.column "salt", :string, :limit => 40
    t.column "fullname", :string, :limit => 60
    t.column "activation_code", :string, :limit => 40
    t.column "activated_at", :datetime
    t.column "created_at", :datetime
    t.column "updated_at", :datetime
  end

end
