Migration from pre summer version leads courses and course templates with out title

Open
#361 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
backend, database

Research direction

Start by reviewing the migration history and the Course and CourseTemplate records involved in the pre-summer migration. Reproduce the console update against affected courses, then verify that both records receive titles without overwriting existing values and that course updates no longer fail.

Written by the indexing model from the issue text.

Description

bug easy important tmc-legacy-course

and thus fails all updates to course.

The fix can be easily applied via console:

Course.all.each do |course|
    course.course_template.update_attributes(title: course.name.humanize)
    course.update_attributes(title: course.name.humanize) 
end

We should either add a new migration just to update these fields and make sure not to rewrite these or just find out and fix the migration which failed to do it...

Dominant language
Ruby
Stars
51
Forks
42
Avg merge
1h 27m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from testmycode/tmc-server

All issues in testmycode/tmc-server

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.