migration getCommands function added