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.
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).
10 # It's strongly recommended to check this file into your version control system.
12 ActiveRecord::Schema.define(:version => 20090607094837) do
14 create_table "candidates", :force => true do |t|
15 t.integer "election_id", :null => false
16 t.string "name", :limit => 100, :null => false
20 create_table "elections", :force => true do |t|
21 t.string "name", :limit => 100, :null => false
22 t.text "description", :null => false
23 t.integer "anonymous", :limit => 1, :default => 1, :null => false
24 t.datetime "startdate"
25 t.datetime "enddate", :null => false
26 t.integer "active", :limit => 1, :default => 0, :null => false
27 t.integer "viewable", :limit => 1, :default => 1, :null => false
28 t.integer "notices", :limit => 1, :default => 0, :null => false
31 t.string "election_method", :limit => 100, :default => "ssd"
32 t.string "type", :limit => 100, :null => false
33 t.boolean "embeddable", :default => false, :null => false
34 t.boolean "authenticated", :default => true, :null => false
35 t.boolean "early_results", :default => false, :null => false
36 t.string "embed_custom_string"
37 t.boolean "kiosk", :default => false, :null => false
38 t.boolean "verifiable", :default => true, :null => false
41 add_index "elections", ["user_id"], :name => "fk_user_election"
43 create_table "pictures", :force => true do |t|
45 t.string "content_type"
51 t.datetime "created_at"
52 t.integer "candidate_id"
55 create_table "rankings", :force => true do |t|
57 t.integer "candidate_id"
61 create_table "sessions", :force => true do |t|
64 t.datetime "updated_at"
67 add_index "sessions", ["sessid"], :name => "session_index"
69 create_table "sitealizer", :force => true do |t|
75 t.datetime "created_at"
79 create_table "skin_pictures", :force => true do |t|
81 t.string "content_type"
85 t.datetime "created_at"
89 create_table "tokens", :force => true do |t|
90 t.string "token", :limit => 100, :null => false
91 t.integer "vote_id", :null => false
94 add_index "tokens", ["vote_id"], :name => "fk_vote_token"
96 create_table "users", :force => true do |t|
98 t.text "ip", :null => false
100 t.string "crypted_password", :limit => 40
101 t.string "salt", :limit => 40
102 t.datetime "created_at"
103 t.datetime "updated_at"
104 t.text "remember_token"
105 t.datetime "remember_token_expires_at"
108 create_table "voters", :force => true do |t|
109 t.string "email", :limit => 100
110 t.string "password", :limit => 100
111 t.integer "contacted", :limit => 1, :default => 0, :null => false
112 t.integer "election_id", :null => false
113 t.string "session_id", :limit => 32
114 t.string "ipaddress", :limit => 32
115 t.string "type", :limit => 100, :null => false
118 add_index "voters", ["election_id"], :name => "fk_election_voter"
120 create_table "votes", :force => true do |t|
122 t.integer "confirmed", :limit => 1, :default => 0, :null => false
126 add_index "votes", ["voter_id"], :name => "fk_vote_voter"