From a5375fc668d97dbb0172012fa959718726bfb06b Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 15 Oct 2016 18:39:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20161015102324_update_all_rake.rb | 2 +- db/schema.rb | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/db/migrate/20161015102324_update_all_rake.rb b/db/migrate/20161015102324_update_all_rake.rb index af3934c0f..4329ab0dd 100644 --- a/db/migrate/20161015102324_update_all_rake.rb +++ b/db/migrate/20161015102324_update_all_rake.rb @@ -1,6 +1,6 @@ class UpdateAllRake < ActiveRecord::Migration def up - attachments = Attachment.where("is_publish = 0 and publish_time <= #{Date.today}") + attachments = Attachment.where("is_publish = 0 and publish_time <= '#{Date.today}'") attachments.update_all(:is_publish => 1) exercises = Exercise.where("publish_time is not null and exercise_status = 1 and publish_time <=?",Time.now) diff --git a/db/schema.rb b/db/schema.rb index 66a6c1710..af81cc795 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20161015054820) do +ActiveRecord::Schema.define(:version => 20161015102324) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -313,16 +313,14 @@ ActiveRecord::Schema.define(:version => 20161015054820) do add_index "changeset_parents", ["parent_id"], :name => "changeset_parents_parent_ids" create_table "changesets", :force => true do |t| - t.integer "repository_id", :null => false - t.string "revision", :null => false + t.integer "repository_id", :null => false + t.string "revision", :null => false t.string "committer" - t.datetime "committed_on", :null => false + t.datetime "committed_on", :null => false t.text "comments" t.date "commit_date" t.string "scmid" t.integer "user_id" - t.integer "project_id" - t.integer "type", :default => 0 end add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on" @@ -973,10 +971,6 @@ ActiveRecord::Schema.define(:version => 20161015054820) do t.datetime "updated_at", :null => false end - create_table "innodb_monitor", :id => false, :force => true do |t| - t.integer "a" - end - create_table "invite_lists", :force => true do |t| t.integer "project_id" t.integer "user_id"