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 => 0) do
7 create_table "candidates", :force => true do |t|
8 t.column "election_id", :integer, :default => 0, :null => false
9 t.column "name", :string, :limit => 100, :default => "", :null => false
10 t.column "picture", :binary, :default => "", :null => false
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 => 0, :null => false
17 t.column "startdate", :datetime, :null => false
18 t.column "enddate", :datetime
21 create_table "rankings", :force => true do |t|
22 t.column "vote_id", :integer
23 t.column "candidate_id", :integer
24 t.column "rank", :integer
27 create_table "tokens", :force => true do |t|
28 t.column "token", :string, :limit => 100, :default => "", :null => false
29 t.column "vote_id", :integer, :default => 0, :null => false
32 add_index "tokens", ["vote_id"], :name => "fk_vote_token"
34 create_table "users", :force => true do |t|
35 t.column "login", :string, :limit => 80, :default => "", :null => false
36 t.column "salted_password", :string, :limit => 40, :default => "", :null => false
37 t.column "email", :string, :limit => 60, :default => "", :null => false
38 t.column "firstname", :string, :limit => 40
39 t.column "lastname", :string, :limit => 40
40 t.column "salt", :string, :limit => 40, :default => "", :null => false
41 t.column "verified", :integer, :default => 0
42 t.column "role", :string, :limit => 40
43 t.column "security_token", :string, :limit => 40
44 t.column "token_expiry", :datetime
45 t.column "created_at", :datetime
46 t.column "updated_at", :datetime
47 t.column "logged_in_at", :datetime
48 t.column "deleted", :integer, :default => 0
49 t.column "delete_after", :datetime
52 create_table "voters", :force => true do |t|
53 t.column "email", :string, :limit => 100, :default => "", :null => false
54 t.column "password", :string, :limit => 100, :default => "", :null => false
55 t.column "contacted", :integer, :limit => 4, :default => 0, :null => false
56 t.column "election_id", :integer, :default => 0, :null => false
59 add_index "voters", ["election_id"], :name => "fk_election_voter"
61 create_table "votes", :force => true do |t|
62 t.column "voter_id", :integer
63 t.column "confirmed", :integer, :limit => 4, :default => 0, :null => false
66 add_index "votes", ["voter_id"], :name => "fk_vote_voter"