Create migration to update unversioned hoc scripts - #43534
Conversation
|
I believe this resource link will break as a result of this |
|
It looks like only |
davidsbailey
left a comment
There was a problem hiding this comment.
LGTM after fixing 2 resource links. everything else looks ok to me after migrating + seeding locally.
changing a version year is definitely harder than I would like it tobe, but I think we may be somewhat committed to that as long as we have markdown content relying on course version keys
100% agree. I hope whenever we get around to changing how course version exists in our system, changing version year and family name get a lot easier. |
| script.course_version.save! | ||
|
|
||
| script.reload | ||
| script.write_script_json |
There was a problem hiding this comment.
I don't think we want this in the migration do we? It will create modifications in every environment
There was a problem hiding this comment.
(This one and the one above)
There was a problem hiding this comment.
Oh ya thats true. I've already updated the script_json as part of the PR so I think we are good.
|
Merging to unblock staging. |

We created a bunch of HOC scripts without version years in the URL (ex. spelling-bee). We want the final scripts for HOC to have
-2021in the url. We are doing this by making copies of the old script and adding-2021to the URL. The old scripts should haveunversionedas their version_year and the new ones should have2021. We were able to do this for 7/10 scripts we wanted [by following these steps](by following these steps ) because theirversion_yearwasunversionedor we were able to set it tounversionedbecause they had no resources or vocab. The remaining 3 scripts have vocab and/or resources and a version_year of 2021. In order to make copies of these scripts we need to get their version_year to beunversioned. The only way to do this is to update the version_year on the script and key and display_name on the course_version directly on each environment. The safest way to do that is with a migration.Testing story
bundle exec rake build