-
Notifications
You must be signed in to change notification settings - Fork 479
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
make script_id required in teacher_feedbacks #38568
Conversation
b294013
to
fbb6f7b
Compare
a07b7f2
to
b184c9d
Compare
856c385
to
af11f91
Compare
6549eaf
to
5740500
Compare
belongs_to :level | ||
belongs_to :script_level | ||
belongs_to :teacher, class_name: 'User' | ||
validate :validate_script_and_script_level, on: :create |
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.
only do this on create, because we want update to succeed at
def increment_visit_count |
end | ||
end | ||
|
||
change_column :teacher_feedbacks, :script_id, :integer, null: false |
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.
If anyone hits an error in this step in their local environment because some TeacherFeedback
objects do not have script ids, they can resolve it by removing those TeacherFeedback
objects.
Finishes PLAT-684. See migrating teacher feedback ids for more context.
Previous PRs:
This PR contains a migration which does the following:
Testing story
Ran the migration forward and backward locally, which succeeds even when some TeacherFeedbacks have no script_id.
Reviewer Checklist: