local migrations = { ["2.0.0"] = function() storage.built_item = {} storage.last_item = {} end, ["2.2.0"] = function() storage.subgroups = nil end, ["2.3.0"] = function() storage.last_item = nil end, } --- @type event_handler local M = {} function M.on_configuration_changed(e) local old_version = e.mod_changes[script.mod_name] and e.mod_changes[script.mod_name].old_version if not old_version then return end for version, migration in pairs(migrations) do if helpers.compare_versions(old_version, version) < 0 then migration() end end end return M