private function publishMigrations($register)
    {
        // read migrations from folder
        $migrationPath = $this->path . '/migrations';
        if (!file_exists($migrationPath)) {
            return;
        }
        $files = [];
        list_files($files, $migrationPath, ['php']);

        // update manifest
        $manifest = $this->getManifest('migrations');
        /** @noinspection PhpIncludeInspection */
        $list = file_exists($manifest) ? include $manifest : [];
        $basePathLength = strlen(base_path()) + 1;
        foreach ($files as $file) {
            $name = basename($file, '.php');
            if ($register) {
                $list[$name] = substr($file, $basePathLength);
            }
            else {
                unset($list[$name]);
            }
        }
        $this->saveArray($manifest, $list);
    }