Commit 83451e2e3a71fa9619e12ff6e0860a80a2ec5d7e

Authored by Chap Ambrose
1 parent 7f3e230c

Adding schema and seeds.

Showing 3 changed files with 236 additions and 1 deletions   Show diff stats
1 log/* 1 log/*
2 tmp/**/* 2 tmp/**/*
3 -db/schema.rb  
4 db/*.sqlite3 3 db/*.sqlite3
5 public/system 4 public/system
6 *.DS_Store 5 *.DS_Store
db/schema.rb 0 → 100644
@@ -0,0 +1,227 @@ @@ -0,0 +1,227 @@
  1 +# This file is auto-generated from the current state of the database. Instead of editing this file,
  2 +# please use the migrations feature of Active Record to incrementally modify your database, and
  3 +# then regenerate this schema definition.
  4 +#
  5 +# Note that this schema.rb definition is the authoritative source for your database schema. If you need
  6 +# to create the application database on another system, you should be using db:schema:load, not running
  7 +# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
  8 +# you'll amass, the slower it'll run and the greater likelihood for issues).
  9 +#
  10 +# It's strongly recommended to check this file into your version control system.
  11 +
  12 +ActiveRecord::Schema.define(:version => 20100621162849) do
  13 +
  14 + create_table "appearances", :force => true do |t|
  15 + t.integer "voter_id"
  16 + t.integer "site_id"
  17 + t.integer "prompt_id"
  18 + t.integer "question_id"
  19 + t.string "lookup"
  20 + t.datetime "created_at"
  21 + t.datetime "updated_at"
  22 + end
  23 +
  24 + add_index "appearances", ["lookup"], :name => "index_appearances_on_lookup"
  25 + add_index "appearances", ["question_id"], :name => "index_appearances_on_question_id"
  26 +
  27 + create_table "choices", :force => true do |t|
  28 + t.integer "item_id"
  29 + t.integer "question_id"
  30 + t.integer "position"
  31 + t.integer "wins"
  32 + t.integer "ratings"
  33 + t.integer "losses"
  34 + t.datetime "created_at"
  35 + t.datetime "updated_at"
  36 + t.integer "request_id"
  37 + t.integer "prompt_id"
  38 + t.boolean "active", :default => false
  39 + t.text "tracking"
  40 + t.float "score"
  41 + t.string "local_identifier"
  42 + t.integer "prompts_on_the_left_count", :default => 0
  43 + t.integer "prompts_on_the_right_count", :default => 0
  44 + t.integer "votes_count", :default => 0
  45 + t.integer "loss_count", :default => 0
  46 + t.integer "prompts_count", :default => 0
  47 + t.string "data"
  48 + t.integer "creator_id"
  49 + end
  50 +
  51 + add_index "choices", ["question_id", "score"], :name => "index_choices_on_question_id_and_score"
  52 +
  53 + create_table "clicks", :force => true do |t|
  54 + t.integer "site_id"
  55 + t.integer "visitor_id"
  56 + t.text "additional_info"
  57 + t.datetime "created_at"
  58 + t.datetime "updated_at"
  59 + t.string "what_was_clicked"
  60 + end
  61 +
  62 + create_table "delayed_jobs", :force => true do |t|
  63 + t.integer "priority", :default => 0
  64 + t.integer "attempts", :default => 0
  65 + t.text "handler"
  66 + t.string "last_error"
  67 + t.datetime "run_at"
  68 + t.datetime "locked_at"
  69 + t.datetime "failed_at"
  70 + t.string "locked_by"
  71 + t.datetime "created_at"
  72 + t.datetime "updated_at"
  73 + end
  74 +
  75 + create_table "densities", :force => true do |t|
  76 + t.integer "question_id"
  77 + t.float "value"
  78 + t.string "prompt_type", :default => ""
  79 + t.datetime "created_at"
  80 + t.datetime "updated_at"
  81 + end
  82 +
  83 + create_table "flags", :force => true do |t|
  84 + t.string "explanation", :default => ""
  85 + t.integer "visitor_id"
  86 + t.integer "choice_id"
  87 + t.integer "question_id"
  88 + t.integer "site_id"
  89 + t.datetime "created_at"
  90 + t.datetime "updated_at"
  91 + end
  92 +
  93 + create_table "items", :force => true do |t|
  94 + t.text "data"
  95 + t.boolean "active"
  96 + t.text "tracking"
  97 + t.integer "creator_id"
  98 + t.integer "voter_id"
  99 + t.integer "site_id"
  100 + t.datetime "created_at"
  101 + t.datetime "updated_at"
  102 + t.integer "question_id"
  103 + end
  104 +
  105 + add_index "items", ["creator_id"], :name => "index_items_on_creator_id"
  106 +
  107 + create_table "oldskips", :force => true do |t|
  108 + t.integer "skipper_id"
  109 + t.integer "prompt_id"
  110 + t.text "tracking"
  111 + t.datetime "created_at"
  112 + t.datetime "updated_at"
  113 + end
  114 +
  115 + create_table "oldvotes", :force => true do |t|
  116 + t.text "tracking"
  117 + t.integer "site_id"
  118 + t.integer "voter_id"
  119 + t.integer "voteable_id"
  120 + t.string "voteable_type", :default => ""
  121 + t.datetime "created_at"
  122 + t.datetime "updated_at"
  123 + end
  124 +
  125 + create_table "prompts", :force => true do |t|
  126 + t.integer "algorithm_id"
  127 + t.integer "question_id"
  128 + t.integer "left_choice_id"
  129 + t.integer "right_choice_id"
  130 + t.integer "voter_id"
  131 + t.boolean "active"
  132 + t.datetime "created_at"
  133 + t.datetime "updated_at"
  134 + t.text "tracking"
  135 + t.integer "votes_count", :default => 0
  136 + t.integer "randomkey"
  137 + end
  138 +
  139 + add_index "prompts", ["left_choice_id", "right_choice_id", "question_id"], :name => "a_cool_index", :unique => true
  140 + add_index "prompts", ["left_choice_id"], :name => "index_prompts_on_left_choice_id"
  141 + add_index "prompts", ["question_id"], :name => "index_prompts_on_question_id"
  142 + add_index "prompts", ["right_choice_id"], :name => "index_prompts_on_right_choice_id"
  143 +
  144 + create_table "questions", :force => true do |t|
  145 + t.integer "creator_id"
  146 + t.string "name", :default => ""
  147 + t.datetime "created_at"
  148 + t.datetime "updated_at"
  149 + t.integer "items_count", :default => 0
  150 + t.integer "active_items_count", :default => 0
  151 + t.integer "choices_count", :default => 0
  152 + t.integer "prompts_count", :default => 0
  153 + t.boolean "active", :default => false
  154 + t.text "tracking"
  155 + t.integer "first_prompt_algorithm_id"
  156 + t.text "information"
  157 + t.integer "site_id"
  158 + t.string "local_identifier"
  159 + t.integer "votes_count", :default => 0
  160 + t.text "bloom"
  161 + t.boolean "it_should_autoactivate_ideas", :default => false
  162 + t.integer "inactive_choices_count", :default => 0
  163 + t.boolean "uses_catchup", :default => true
  164 + end
  165 +
  166 + create_table "skips", :force => true do |t|
  167 + t.text "tracking"
  168 + t.integer "site_id"
  169 + t.integer "skipper_id"
  170 + t.integer "question_id"
  171 + t.integer "prompt_id"
  172 + t.integer "appearance_id"
  173 + t.integer "time_viewed"
  174 + t.datetime "created_at"
  175 + t.datetime "updated_at"
  176 + t.string "skip_reason"
  177 + t.string "missing_response_time_exp", :default => ""
  178 + end
  179 +
  180 + add_index "skips", ["prompt_id"], :name => "index_skips_on_prompt_id"
  181 + add_index "skips", ["question_id"], :name => "index_skips_on_question_id"
  182 +
  183 + create_table "users", :force => true do |t|
  184 + t.string "email"
  185 + t.string "encrypted_password", :limit => 128
  186 + t.string "salt", :limit => 128
  187 + t.string "confirmation_token", :limit => 128
  188 + t.string "remember_token", :limit => 128
  189 + t.boolean "email_confirmed", :default => false, :null => false
  190 + t.datetime "created_at"
  191 + t.datetime "updated_at"
  192 + end
  193 +
  194 + add_index "users", ["email"], :name => "index_users_on_email"
  195 + add_index "users", ["id", "confirmation_token"], :name => "index_users_on_id_and_confirmation_token"
  196 + add_index "users", ["remember_token"], :name => "index_users_on_remember_token"
  197 +
  198 + create_table "visitors", :force => true do |t|
  199 + t.integer "site_id"
  200 + t.string "identifier", :default => ""
  201 + t.text "tracking"
  202 + t.boolean "activated"
  203 + t.integer "user_id"
  204 + t.datetime "created_at"
  205 + t.datetime "updated_at"
  206 + end
  207 +
  208 + add_index "visitors", ["identifier", "site_id"], :name => "index_visitors_on_identifier_and_site_id", :unique => true
  209 +
  210 + create_table "votes", :force => true do |t|
  211 + t.text "tracking"
  212 + t.integer "site_id"
  213 + t.integer "voter_id"
  214 + t.integer "question_id"
  215 + t.integer "prompt_id"
  216 + t.integer "choice_id"
  217 + t.integer "loser_choice_id"
  218 + t.datetime "created_at"
  219 + t.datetime "updated_at"
  220 + t.integer "time_viewed"
  221 + t.integer "appearance_id"
  222 + t.string "missing_response_time_exp", :default => ""
  223 + end
  224 +
  225 + add_index "votes", ["voter_id"], :name => "index_votes_on_voter_id"
  226 +
  227 +end
db/seeds.rb 0 → 100644
@@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
  1 +# rake db:seed
  2 +# load the API user for AOI dev environment
  3 +
  4 +u = User.new(:email => "pairwisetest@dkapadia.com", :password => "wheatthins")
  5 +u.save(false)
  6 +
  7 +
  8 +u = User.new(:email => "photocracytest@dkapadia.com", :password => "saltines")
  9 +u.save(false)
0 \ No newline at end of file 10 \ No newline at end of file