-- Sub 3 Phase A verification
\echo '--- Process node new fields present ---'
SELECT column_name, data_type FROM information_schema.columns
WHERE table_name='fusion_plating_process_node'
  AND column_name IN ('part_catalog_id','cloned_from_id','treatment_uom')
ORDER BY column_name;

\echo '--- fp.part.catalog.default_process_id present ---'
SELECT column_name, data_type FROM information_schema.columns
WHERE table_name='fp_part_catalog' AND column_name='default_process_id';

\echo '--- General Processing seed installed ---'
SELECT id, name, code, node_type, part_catalog_id FROM fusion_plating_process_node
WHERE code='GEN-PROC' OR name='General Processing';

\echo '--- All existing nodes have part_catalog_id NULL (shared templates) ---'
SELECT COUNT(*) FILTER (WHERE part_catalog_id IS NULL) AS shared_templates,
       COUNT(*) FILTER (WHERE part_catalog_id IS NOT NULL) AS part_owned
FROM fusion_plating_process_node;

\echo '--- Module versions on entech ---'
SELECT name, latest_version FROM ir_module_module
WHERE name IN ('fusion_plating','fusion_plating_configurator','fusion_plating_bridge_mrp')
ORDER BY name;
