-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
migration for changing status of comments #3006
Conversation
Generated by 🚫 Danger |
class ChangeStatusOfComments < ActiveRecord::Migration[5.2] | ||
def up | ||
Comment.all.each do |comment| | ||
comment.status = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's this related to? Can't understand the context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some time before we made a migration for setting default column value as 1 for comment, in that PR statement for changing previous comment status are also included but that doesn't work. So, right now in production DB, there is a mix of comments with status =1 and 0. For the implementation of Spam moderation system, it's required that all comments should carry status 1, otherwise many comments would become invisible. @siaw23 do you think this migration would work?
@jywarren please review this. Thanks! |
Excellent. Thanks! |
I just got in the console:
Comment.where(status: 0).count
=> 0
…On Tue, Jul 10, 2018 at 4:42 PM Gaurav Sachdeva ***@***.***> wrote:
@jywarren <https://github.com/jywarren> could you please check the DB for
comment status so that #2957
<#2957> can be merged. Thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3006 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ_vdK6eKddVG2lm93Q1F3wBe2Xbiks5uFRGjgaJpZM4VGQfA>
.
|
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
rake test
fixes #0000
-style reference to original issue #@publiclab/reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
We have a loose schedule of reviewing and pulling in changes every Tuesday and Friday, and publishing changes on Fridays.
Thanks!