Skip to content

Commit

Permalink
migration for changing status (publiclab#3006)
Browse files Browse the repository at this point in the history
  • Loading branch information
grvsachdeva authored and jywarren committed Jul 10, 2018
1 parent 8c2aef0 commit 4aa37f4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions db/migrate/20180707065151_change_status_of_comments.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class ChangeStatusOfComments < ActiveRecord::Migration[5.2]
def up
Comment.all.each do |comment|
comment.status = 1
comment.save
end
end

def down
end
end
2 changes: 1 addition & 1 deletion db/schema.rb.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2018_07_05_203310) do
ActiveRecord::Schema.define(version: 2018_07_07_065151) do

create_table "answer_selections", force: true do |t|
t.integer "user_id"
Expand Down

0 comments on commit 4aa37f4

Please sign in to comment.