adapt_framework icon indicating copy to clipboard operation
adapt_framework copied to clipboard

Add the ability to pass in a folder containing migration scripts.

Open joe-allen-89 opened this issue 10 months ago • 3 comments

Currently the only way to include migration scripts is within a plugin, it would be useful, especially in the authoring tool, to be able to have a seperate folder containing multiple scripts, for example updating the start controller on course import.

joe-allen-89 avatar Apr 17 '25 09:04 joe-allen-89

Script paths are passed in from grunt. This library doesn't find the scripts itself. Could you be more specific about the start controller migration scripts please? Why could they not live in core where the start controller lives?

oliverfoster avatar Apr 17 '25 09:04 oliverfoster

Script paths are passed in from grunt. This library doesn't find the scripts itself. Could you be more specific about the start controller migration scripts please? Why could they not live in core where the start controller lives?

Realised I raised it in the wrong place was just about to transfer.

When importing a course into the authoring tool the ids are reset meaning that the id listed in the start controller isn't linking to anything, with a migration script we can find the item the start controller is targetting and give it a friendlyid as well as updating the start controller. This was probably a bad example as it could live in core, albeit only being an authoring tool issue.

A better example would be Tom had made some migration scripts for the authoring tool (https://github.com/adapt-security/adapt-authoring-adaptframework/tree/master/lib/migrations), the ability to set a custom folder would allow us to update these to work with adapt-migrations and have a standaridised approach.

joe-allen-89 avatar Apr 17 '25 10:04 joe-allen-89

Yup, passing a custom folder through the grunt options would be cool --customscriptsdir=

oliverfoster avatar Apr 17 '25 10:04 oliverfoster

:tada: This issue has been resolved in version 5.52.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Sep 17 '25 10:09 github-actions[bot]