@wbmnfktr
I'm not using @bernhard’s tool but you could go this way to have your initial migrate.php:
$rm = $modules->get("RockMigrations");
$excludedFields = ["admin_theme", "pass", "permissions", "process", "roles"];
$fieldsCode = [];
foreach($fields as $field) {
if(in_array($field->name, $excludedFields)) continue;
$fieldsCode[] = $rm->getCode($field);
}
$fieldsCode = "\$rm->migrate(\"fields\" => [\n" . implode(",\n", $fieldsCode) . "\n];";
$excludedTemplates = ["admin", "permission", "role", "user"];
$templatesCode = [];
foreach($templates as $template) {
if(in_array($template->name, $excludedTemplates)) continue;
$templatesCode[] = $rm->getCode($template);
}
$templatesCode = "\$rm->migrate(\"templates\" => [\n" . implode(",\n", $templatesCode) . "\n];";
And export $fieldsCode and $templatesCode in a file.
Regarding the verbosity, it unfortunately boils down to how PW generates the export data. You could be pretty agressive and skip all falsy values but you might get unexpected behaviour.