1 # This file is autogenerated. Instead of editing this file, please use the
2 # migrations feature of ActiveRecord to incrementally modify your database, and
3 # then regenerate this schema definition.
5 ActiveRecord::Schema.define(:version => 2) do
7 create_table "candidates", :force => true do |t|
8 t.column "election_id", :integer, :null => false
9 t.column "name", :string, :limit => 100, :default => "", :null => false
10 t.column "description", :text
13 create_table "elections", :force => true do |t|
14 t.column "name", :string, :limit => 100, :default => "", :null => false
15 t.column "description", :text, :default => "", :null => false
16 t.column "anonymous", :integer, :limit => 4, :default => 1, :null => false
17 t.column "startdate", :datetime
18 t.column "enddate", :datetime, :null => false
19 t.column "active", :integer, :limit => 4, :default => 0, :null => false
20 t.column "viewable", :integer, :limit => 4, :default => 1, :null => false
21 t.column "notices", :integer, :limit => 4, :default => 0, :null => false
22 t.column "user_id", :integer
23 t.column "quickuser", :string
24 t.column "election_method", :string, :limit => 100, :default => "ssd"
25 t.column "type", :string, :limit => 100, :default => "", :null => false
26 t.column "embeddable", :boolean, :default => false, :null => false
27 t.column "authenticated", :boolean, :default => true, :null => false
28 t.column "early_results", :boolean, :default => false, :null => false
31 add_index "elections", ["user_id"], :name => "fk_user_election"
33 create_table "pictures", :force => true do |t|
34 t.column "filename", :string
35 t.column "content_type", :string
36 t.column "size", :integer
37 t.column "width", :integer
38 t.column "height", :integer
39 t.column "parent_id", :integer
40 t.column "thumbnail", :string
41 t.column "created_at", :datetime
42 t.column "candidate_id", :integer
45 create_table "rankings", :force => true do |t|
46 t.column "vote_id", :integer
47 t.column "candidate_id", :integer
48 t.column "rank", :integer
51 create_table "sessions", :force => true do |t|
52 t.column "sessid", :string
53 t.column "data", :text
54 t.column "updated_at", :datetime
57 add_index "sessions", ["sessid"], :name => "session_index"
59 create_table "sitealizer", :force => true do |t|
60 t.column "path", :string
61 t.column "ip", :string
62 t.column "referer", :string
63 t.column "language", :string
64 t.column "user_agent", :string
65 t.column "created_at", :datetime
66 t.column "created_on", :date
69 create_table "tokens", :force => true do |t|
70 t.column "token", :string, :limit => 100, :default => "", :null => false
71 t.column "vote_id", :integer, :null => false
74 add_index "tokens", ["vote_id"], :name => "fk_vote_token"
76 create_table "users", :force => true do |t|
77 t.column "login", :text
78 t.column "ip", :text, :default => "", :null => false
79 t.column "email", :text
80 t.column "crypted_password", :string, :limit => 40
81 t.column "salt", :string, :limit => 40
82 t.column "created_at", :datetime
83 t.column "updated_at", :datetime
84 t.column "remember_token", :text
85 t.column "remember_token_expires_at", :datetime
88 create_table "voters", :force => true do |t|
89 t.column "email", :string, :limit => 100
90 t.column "password", :string, :limit => 100
91 t.column "contacted", :integer, :limit => 4, :default => 0, :null => false
92 t.column "election_id", :integer, :null => false
93 t.column "session_id", :string, :limit => 32
94 t.column "ipaddress", :string, :limit => 32
95 t.column "type", :string, :limit => 100, :default => "", :null => false
98 add_index "voters", ["election_id"], :name => "fk_election_voter"
100 create_table "votes", :force => true do |t|
101 t.column "voter_id", :integer
102 t.column "confirmed", :integer, :limit => 4, :default => 0, :null => false
103 t.column "time", :datetime
106 add_index "votes", ["voter_id"], :name => "fk_vote_voter"