schema.rb

This commit is contained in:
lizanle 2015-12-31 11:13:44 +08:00
parent ff88d1ed2c
commit b059ab2428
1 changed files with 20 additions and 237 deletions

View File

@ -11,8 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20151230022443) do
ActiveRecord::Schema.define(:version => 20151102090519) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -67,41 +66,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.datetime "updated_at", :null => false
end
create_table "at_messages", :force => true do |t|
t.integer "user_id"
t.integer "at_message_id"
t.string "at_message_type"
t.boolean "viewed", :default => false
t.string "container_type"
t.integer "container_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "sender_id"
end
add_index "at_messages", ["user_id"], :name => "index_at_messages_on_user_id"
create_table "attachment_histories", :force => true do |t|
t.integer "container_id"
t.string "container_type"
t.string "filename", :default => ""
t.string "disk_filename", :default => ""
t.integer "filesize", :default => 0
t.string "content_type", :default => ""
t.string "digest", :limit => 40, :default => ""
t.integer "downloads", :default => 0
t.integer "author_id"
t.datetime "created_on"
t.string "description"
t.string "disk_directory"
t.integer "attachtype"
t.integer "is_public"
t.integer "copy_from"
t.integer "quotes"
t.integer "version"
t.integer "attachment_id"
end
create_table "attachments", :force => true do |t|
t.integer "container_id"
t.string "container_type", :limit => 30
@ -119,7 +83,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.integer "is_public", :default => 1
t.integer "copy_from"
t.integer "quotes"
t.integer "version", :default => 0
end
add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id"
@ -419,20 +382,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.integer "container_id", :default => 0
end
create_table "course_contributor_scores", :force => true do |t|
t.integer "course_id"
t.integer "user_id"
t.integer "message_num"
t.integer "message_reply_num"
t.integer "news_reply_num"
t.integer "resource_num"
t.integer "journal_num"
t.integer "journal_reply_num"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "total_score"
end
create_table "course_groups", :force => true do |t|
t.string "name"
t.integer "course_id"
@ -476,8 +425,8 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.string "code"
t.integer "time"
t.string "extra"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "location"
t.string "term"
t.string "string"
@ -487,16 +436,14 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.string "class_period"
t.integer "school_id"
t.text "description"
t.integer "status", :default => 1
t.integer "attachmenttype", :default => 2
t.integer "status", :default => 1
t.integer "attachmenttype", :default => 2
t.integer "lft"
t.integer "rgt"
t.integer "is_public", :limit => 1, :default => 1
t.integer "inherit_members", :limit => 1, :default => 1
t.integer "open_student", :default => 0
t.integer "outline", :default => 0
t.integer "publish_resource", :default => 0
t.integer "is_delete", :default => 0
t.integer "is_public", :limit => 1, :default => 1
t.integer "inherit_members", :limit => 1, :default => 1
t.integer "open_student", :default => 0
t.integer "outline", :default => 0
end
create_table "custom_fields", :force => true do |t|
@ -600,12 +547,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.datetime "updated_at", :null => false
end
create_table "editor_of_documents", :force => true do |t|
t.integer "editor_id"
t.integer "org_document_comment_id"
t.datetime "created_at"
end
create_table "enabled_modules", :force => true do |t|
t.integer "project_id"
t.string "name", :null => false
@ -628,66 +569,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type"
add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id"
create_table "exercise_answers", :force => true do |t|
t.integer "user_id"
t.integer "exercise_question_id"
t.integer "exercise_choice_id"
t.text "answer_text"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "exercise_choices", :force => true do |t|
t.integer "exercise_question_id"
t.text "choice_text"
t.integer "choice_position"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "exercise_questions", :force => true do |t|
t.text "question_title"
t.integer "question_type"
t.integer "question_number"
t.integer "exercise_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "question_score"
end
create_table "exercise_standard_answers", :force => true do |t|
t.integer "exercise_question_id"
t.integer "exercise_choice_id"
t.text "answer_text"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "exercise_users", :force => true do |t|
t.integer "user_id"
t.integer "exercise_id"
t.integer "score"
t.datetime "start_at"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "end_at"
t.integer "status"
end
create_table "exercises", :force => true do |t|
t.text "exercise_name"
t.text "exercise_description"
t.integer "course_id"
t.integer "exercise_status"
t.integer "user_id"
t.integer "time"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "publish_time"
t.datetime "end_time"
t.integer "show_result"
end
create_table "first_pages", :force => true do |t|
t.string "web_title"
t.string "title"
@ -777,19 +658,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.integer "anonymous_comment", :default => 0
end
add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id"
create_table "homework_detail_groups", :force => true do |t|
t.integer "homework_common_id"
t.integer "min_num"
t.integer "max_num"
t.integer "base_on_project"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "homework_detail_groups", ["homework_common_id"], :name => "index_homework_detail_groups_on_homework_common_id"
create_table "homework_detail_manuals", :force => true do |t|
t.float "ta_proportion"
t.integer "comment_status"
@ -1075,7 +943,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.boolean "locked", :default => false
t.integer "sticky", :default => 0
t.integer "reply_id"
t.integer "quotes"
end
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
@ -1093,7 +960,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.datetime "created_on"
t.integer "comments_count", :default => 0, :null => false
t.integer "course_id"
t.integer "sticky", :default => 0
end
add_index "news", ["author_id"], :name => "index_news_on_author_id"
@ -1179,69 +1045,10 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.integer "project_id"
end
create_table "org_activities", :force => true do |t|
t.integer "user_id"
t.integer "org_act_id"
t.string "org_act_type"
t.integer "container_id"
t.string "container_type"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "org_courses", :force => true do |t|
t.integer "organization_id"
t.integer "course_id"
t.datetime "created_at"
end
create_table "org_document_comments", :force => true do |t|
t.text "title"
t.text "content"
t.integer "organization_id"
t.integer "creator_id"
t.integer "parent_id"
t.integer "reply_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.boolean "locked", :default => false
t.integer "sticky", :default => 0
t.integer "org_subfield_id"
end
create_table "org_member_roles", :force => true do |t|
t.integer "org_member_id"
t.integer "role_id"
end
create_table "org_members", :force => true do |t|
t.integer "user_id"
t.integer "organization_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "org_projects", :force => true do |t|
t.integer "organization_id"
t.integer "project_id"
t.datetime "created_at"
end
create_table "org_subfield_messages", :force => true do |t|
t.integer "org_subfield_id"
t.integer "message_id"
t.string "message_type"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "org_subfields", :force => true do |t|
t.integer "organization_id"
t.integer "priority"
t.string "name"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "field_type"
t.integer "user_id"
t.integer "organization_id"
t.string "role"
end
create_table "organizations", :force => true do |t|
@ -1377,30 +1184,27 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
end
create_table "projects", :force => true do |t|
t.string "name", :default => "", :null => false
t.string "name", :default => "", :null => false
t.text "description"
t.string "homepage", :default => ""
t.boolean "is_public", :default => true, :null => false
t.string "homepage", :default => ""
t.boolean "is_public", :default => true, :null => false
t.integer "parent_id"
t.datetime "created_on"
t.datetime "updated_on"
t.string "identifier"
t.integer "status", :default => 1, :null => false
t.integer "status", :default => 1, :null => false
t.integer "lft"
t.integer "rgt"
t.boolean "inherit_members", :default => false, :null => false
t.boolean "inherit_members", :default => false, :null => false
t.integer "project_type"
t.boolean "hidden_repo", :default => false, :null => false
t.integer "attachmenttype", :default => 1
t.boolean "hidden_repo", :default => false, :null => false
t.integer "attachmenttype", :default => 1
t.integer "user_id"
t.integer "dts_test", :default => 0
t.integer "dts_test", :default => 0
t.string "enterprise_name"
t.integer "organization_id"
t.integer "project_new_type"
t.integer "gpid"
t.integer "forked_from_project_id"
t.integer "forked_count"
t.integer "commits_count", :default => 0
end
add_index "projects", ["lft"], :name => "index_projects_on_lft"
@ -1565,21 +1369,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.integer "project_id"
end
create_table "student_work_projects", :force => true do |t|
t.integer "homework_common_id"
t.integer "student_work_id"
t.integer "project_id"
t.integer "user_id"
t.integer "is_leader"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "student_work_projects", ["homework_common_id"], :name => "index_student_work_projects_on_homework_common_id"
add_index "student_work_projects", ["project_id"], :name => "index_student_work_projects_on_project_id"
add_index "student_work_projects", ["student_work_id"], :name => "index_student_work_projects_on_student_work_id"
add_index "student_work_projects", ["user_id"], :name => "index_student_work_projects_on_user_id"
create_table "student_work_tests", :force => true do |t|
t.integer "student_work_id"
t.datetime "created_at", :null => false
@ -1607,8 +1396,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.boolean "is_test", :default => false
end
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
create_table "student_works_evaluation_distributions", :force => true do |t|
t.integer "student_work_id"
t.integer "user_id"
@ -1673,10 +1460,6 @@ ActiveRecord::Schema.define(:version => 20151230022443) do
t.string "extra"
end
create_table "temp", :id => false, :force => true do |t|
t.integer "id", :default => 0, :null => false
end
create_table "time_entries", :force => true do |t|
t.integer "project_id", :null => false
t.integer "user_id", :null => false