删除学生提交的多分作品
This commit is contained in:
parent
8611fbbdec
commit
0fa16251e7
|
@ -0,0 +1,11 @@
|
||||||
|
class DeleteOtherWorks < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
works = StudentWork.where("homework_common_id = 3253 and user_id = 10740 and final_score = 0")
|
||||||
|
unless works.empty?
|
||||||
|
works.destroy_all
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
end
|
||||||
|
end
|
48
db/schema.rb
48
db/schema.rb
|
@ -11,11 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
<<<<<<< HEAD
|
ActiveRecord::Schema.define(:version => 20160418074429) do
|
||||||
ActiveRecord::Schema.define(:version => 20160331063938) do
|
|
||||||
=======
|
|
||||||
ActiveRecord::Schema.define(:version => 20160405021915) do
|
|
||||||
>>>>>>> c3ee4dadfb92c75e8649cad7e0ed57c2ec02ec00
|
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -813,6 +809,7 @@ ActiveRecord::Schema.define(:version => 20160405021915) do
|
||||||
t.integer "anonymous_comment", :default => 0
|
t.integer "anonymous_comment", :default => 0
|
||||||
t.integer "quotes", :default => 0
|
t.integer "quotes", :default => 0
|
||||||
t.integer "is_open", :default => 0
|
t.integer "is_open", :default => 0
|
||||||
|
t.datetime "simi_time"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id"
|
add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id"
|
||||||
|
@ -1524,6 +1521,18 @@ ActiveRecord::Schema.define(:version => 20160405021915) do
|
||||||
t.string "topic_resource"
|
t.string "topic_resource"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "rep_statics", :force => true do |t|
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "commits_num"
|
||||||
|
t.string "uname"
|
||||||
|
t.string "email"
|
||||||
|
t.integer "add"
|
||||||
|
t.integer "del"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "changeset"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "repositories", :force => true do |t|
|
create_table "repositories", :force => true do |t|
|
||||||
t.integer "project_id", :default => 0, :null => false
|
t.integer "project_id", :default => 0, :null => false
|
||||||
t.string "url", :default => "", :null => false
|
t.string "url", :default => "", :null => false
|
||||||
|
@ -1689,6 +1698,8 @@ ActiveRecord::Schema.define(:version => 20160405021915) do
|
||||||
t.integer "absence_penalty", :default => 0
|
t.integer "absence_penalty", :default => 0
|
||||||
t.float "system_score", :default => 0.0
|
t.float "system_score", :default => 0.0
|
||||||
t.boolean "is_test", :default => false
|
t.boolean "is_test", :default => false
|
||||||
|
t.integer "simi_id"
|
||||||
|
t.integer "simi_value"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
|
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
|
||||||
|
@ -1921,6 +1932,25 @@ ActiveRecord::Schema.define(:version => 20160405021915) do
|
||||||
add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade"
|
add_index "user_statuses", ["grade"], :name => "index_user_statuses_on_grade"
|
||||||
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
|
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
|
||||||
|
|
||||||
|
create_table "user_wechats", :force => true do |t|
|
||||||
|
t.integer "subscribe"
|
||||||
|
t.string "openid"
|
||||||
|
t.string "nickname"
|
||||||
|
t.integer "sex"
|
||||||
|
t.string "language"
|
||||||
|
t.string "city"
|
||||||
|
t.string "province"
|
||||||
|
t.string "country"
|
||||||
|
t.string "headimgurl"
|
||||||
|
t.string "subscribe_time"
|
||||||
|
t.string "unionid"
|
||||||
|
t.string "remark"
|
||||||
|
t.integer "groupid"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "users", :force => true do |t|
|
create_table "users", :force => true do |t|
|
||||||
t.string "login", :default => "", :null => false
|
t.string "login", :default => "", :null => false
|
||||||
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
||||||
|
@ -1997,6 +2027,14 @@ ActiveRecord::Schema.define(:version => 20160405021915) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "wechat_logs", :force => true do |t|
|
||||||
|
t.string "openid", :null => false
|
||||||
|
t.text "request_raw"
|
||||||
|
t.text "response_raw"
|
||||||
|
t.text "session_raw"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "wiki_content_versions", :force => true do |t|
|
create_table "wiki_content_versions", :force => true do |t|
|
||||||
t.integer "wiki_content_id", :null => false
|
t.integer "wiki_content_id", :null => false
|
||||||
t.integer "page_id", :null => false
|
t.integer "page_id", :null => false
|
||||||
|
|
Loading…
Reference in New Issue