Skip to content
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

Merged
merged 2 commits into from
Jul 10, 2018

Conversation

grvsachdeva
Copy link
Member

@grvsachdeva grvsachdeva commented Jul 7, 2018

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • PR body includes fixes #0000-style reference to original issue #
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If 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!

@ghost ghost assigned grvsachdeva Jul 7, 2018
@ghost ghost added the in progress label Jul 7, 2018
@grvsachdeva grvsachdeva mentioned this pull request Jul 7, 2018
5 tasks
@plotsbot
Copy link
Collaborator

plotsbot commented Jul 7, 2018

2 Warnings
⚠️ New migrations added. Please update schema.rb.example by overwriting it with a copy of the up-to-date db/schema.rb. Also, be aware to preserve the MySQL-specific conditions for full-text indices.
⚠️ It looks like you merged from master in this pull request. Please rebase to get rid of the merge commits – you may want to rewind the master branch and rebase instead of merging in from master, which can cause problems when accepting new code!
1 Message
📖 @Gauravano Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.

Generated by 🚫 Danger

@grvsachdeva grvsachdeva requested review from jywarren and a team July 7, 2018 07:16
class ChangeStatusOfComments < ActiveRecord::Migration[5.2]
def up
Comment.all.each do |comment|
comment.status = 1
Copy link
Collaborator

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.

Copy link
Member Author

@grvsachdeva grvsachdeva Jul 8, 2018

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?

@grvsachdeva
Copy link
Member Author

@jywarren please review this. Thanks!

@jywarren
Copy link
Member

Excellent. Thanks!

@jywarren jywarren merged commit 7531464 into publiclab:master Jul 10, 2018
@ghost ghost removed the ready label Jul 10, 2018
@grvsachdeva
Copy link
Member Author

@jywarren could you please check the DB for comment status so that #2957 can be merged. Thanks!

@jywarren
Copy link
Member

jywarren commented Jul 10, 2018 via email

SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this pull request May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants