protected function unmigrateHook(Hook $hook)
    {
        $migrations = (array) $hook->getComposerHookKey('migrations', []);

        foreach ($migrations as $path) {
            if ($this->filesystem->isDirectory($hook->getPath().'/'.$path)) {
                $this->migrator->reset($this->realPath([$path], $hook->getPath().'/')->all());
            } else {
                $this->migrator->resetFiles($this->realPath([$path], $hook->getPath().'/')->all());
            }
        }
    }