-- Seed castas portuguesas (cliente_produtor)
INSERT INTO castas (cliente_id, nome)
SELECT c.id, v.nome
FROM clientes c
JOIN (
  SELECT 'Touriga Nacional' AS nome UNION ALL
  SELECT 'Touriga Franca' UNION ALL
  SELECT 'Tinta Roriz' UNION ALL
  SELECT 'Tinta Barroca' UNION ALL
  SELECT 'Tinto Cão' UNION ALL
  SELECT 'Jaen' UNION ALL
  SELECT 'Alfrocheiro' UNION ALL
  SELECT 'Baga' UNION ALL
  SELECT 'Aragonez' UNION ALL
  SELECT 'Trincadeira' UNION ALL
  SELECT 'Castelão' UNION ALL
  SELECT 'Alicante Bouschet' UNION ALL
  SELECT 'Syrah' UNION ALL
  SELECT 'Cabernet Sauvignon' UNION ALL
  SELECT 'Merlot' UNION ALL
  SELECT 'Sousão' UNION ALL
  SELECT 'Vinhão' UNION ALL
  SELECT 'Loureiro' UNION ALL
  SELECT 'Alvarinho' UNION ALL
  SELECT 'Arinto' UNION ALL
  SELECT 'Fernão Pires' UNION ALL
  SELECT 'Antão Vaz' UNION ALL
  SELECT 'Encruzado' UNION ALL
  SELECT 'Rabigato' UNION ALL
  SELECT 'Malvasia Fina' UNION ALL
  SELECT 'Viosinho' UNION ALL
  SELECT 'Gouveio' UNION ALL
  SELECT 'Cercial' UNION ALL
  SELECT 'Bical' UNION ALL
  SELECT 'Esgana Cão'
) v
WHERE c.username = 'cliente_produtor'
ON DUPLICATE KEY UPDATE nome = VALUES(nome);
