迁移的修改
This commit is contained in:
parent
484f1be57b
commit
a5375fc668
|
@ -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)
|
||||
|
|
14
db/schema.rb
14
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"
|
||||
|
|
Loading…
Reference in New Issue