1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your database schema. If you need
# to create the application database on another system, you should be using db:schema:load, not running
# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20101005121508) do
create_table "answers", :force => true do |t|
t.text "content", :default => "", :null => false
t.boolean "approved", :default => false
t.boolean "reference", :default => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "question_id", :null => false
t.integer "owner_id"
t.string "type"
t.string "feedback", :default => ""
t.boolean "correct"
end
add_index "answers", ["owner_id"], :name => "index_answers_on_owner_id"
add_index "answers", ["question_id"], :name => "index_answers_on_question_id"
add_index "answers", ["type"], :name => "index_answers_on_type"
create_table "comments", :force => true do |t|
t.text "content", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "answer_id", :null => false
t.integer "owner_id"
end
add_index "comments", ["answer_id"], :name => "index_comments_on_answer_id"
add_index "comments", ["owner_id"], :name => "index_comments_on_owner_id"
create_table "delayed_jobs", :force => true do |t|
t.integer "priority", :default => 0
t.integer "attempts", :default => 0
t.text "handler"
t.string "last_error"
t.datetime "run_at"
t.datetime "locked_at"
t.datetime "failed_at"
t.string "locked_by"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "options", :force => true do |t|
t.string "content", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "option_owner_id", :null => false
t.string "option_owner_type", :null => false
end
add_index "options", ["option_owner_type", "option_owner_id"], :name => "index_options_on_option_owner_type_and_option_owner_id"
create_table "project_acceptances", :force => true do |t|
t.string "accepting_nick", :null => false
t.boolean "accepted", :default => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id", :null => false
end
add_index "project_acceptances", ["user_id"], :name => "index_project_acceptances_on_user_id"
create_table "question_categories", :force => true do |t|
t.string "name", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "question_content_emails", :force => true do |t|
t.text "requirements", :default => "", :null => false
t.text "description"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "question_id", :null => false
end
add_index "question_content_emails", ["question_id"], :name => "index_question_content_emails_on_question_id"
create_table "question_content_multiple_choices", :force => true do |t|
t.text "content", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "question_id", :null => false
end
add_index "question_content_multiple_choices", ["question_id"], :name => "index_question_content_multiple_choices_on_question_id"
create_table "question_content_texts", :force => true do |t|
t.text "content", :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "question_id", :null => false
end
add_index "question_content_texts", ["question_id"], :name => "index_question_content_texts_on_question_id"
create_table "question_groups", :force => true do |t|
t.string "name", :null => false
t.text "description", :null => false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "questions", :force => true do |t|
t.string "title", :null => false
t.string "documentation"
t.boolean "approved", :default => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id"
t.integer "question_category_id"
t.integer "question_group_id"
end
add_index "questions", ["question_category_id"], :name => "index_questions_on_question_category_id"
add_index "questions", ["question_group_id"], :name => "index_questions_on_question_group_id"
add_index "questions", ["user_id"], :name => "index_questions_on_user_id"
create_table "user_categories", :force => true do |t|
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id", :null => false
t.integer "question_category_id", :null => false
end
add_index "user_categories", ["question_category_id"], :name => "index_user_categories_on_question_category_id"
add_index "user_categories", ["user_id"], :name => "index_user_categories_on_user_id"
create_table "user_question_groups", :force => true do |t|
t.datetime "created_at"
t.datetime "updated_at"
t.integer "user_id", :null => false
t.integer "question_id", :null => false
end
add_index "user_question_groups", ["question_id"], :name => "index_user_question_groups_on_question_id"
add_index "user_question_groups", ["user_id"], :name => "index_user_question_groups_on_user_id"
create_table "users", :force => true do |t|
t.string "crypted_password", :limit => 40
t.string "salt", :limit => 40
t.string "remember_token"
t.datetime "remember_token_expires_at"
t.string "name"
t.string "email_address"
t.boolean "administrator", :default => false
t.string "role", :default => "recruit"
t.string "nick"
t.text "contributions"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "mentor_id"
t.string "state", :default => "active"
t.datetime "key_timestamp"
t.boolean "project_lead", :default => false
t.string "token"
t.string "openid"
end
add_index "users", ["mentor_id"], :name => "index_users_on_mentor_id"
add_index "users", ["state"], :name => "index_users_on_state"
end
|