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
updated question as requested #2969
Conversation
@@ -0,0 +1,6 @@ | |||
class ChangeConsentQuestionInStudyQuestions < ActiveRecord::Migration[5.2] | |||
def change | |||
@stq = StudyTypeQuestion.find(13) |
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.
Finding by ID can be dangerous. I think this might be better suited as a post deploy manual fix but maybe others can chime in
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.
I just updated the migration, if that helps. Otherwise, we can go with your idea, if necessary. I just feel like it does need to be a migration just to make sure that anyone who pulls the code has the most current things in the database since these records are programmatically significant instead of arbitrary data.
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.
@Ito-Eta This is great work, but I think I agree with @amcates here in that this should be a rake task instead of a migration. We should only be using migrations for schema changes (the exception here is if you need to move data around as the result of a schema change). If you put a note in the release marker your rake task will get run when production is updated. Me and Sherly have a couple of them in there.
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.
Okay. Updated to rake task, the migration was deleted, and a note was added to the release marker.
@@ -10,7 +10,7 @@ | |||
# | |||
# It's strongly recommended that you check this file into your version control system. | |||
|
|||
ActiveRecord::Schema.define(version: 2022_09_07_153451) do | |||
ActiveRecord::Schema.define(version: 2022_09_19_141351) do |
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.
Interesting that this changed. I guess it doesn't cause any issues
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.
Looks great!
As requested in the pivotal story, updated one of the study type questions to include new text.
pivotal story: https://www.pivotaltracker.com/story/show/182204348