-- Simple insert of test portfolio data
-- Insert test portfolio projects with explicit IDs

-- Find the next available ID
DO $$
DECLARE
  next_id INTEGER;
BEGIN
  SELECT COALESCE(MAX(id), 0) + 1 INTO next_id FROM portfolioprojects;
  
  -- Insert with explicit IDs starting from next_id
  EXECUTE format('
    INSERT INTO portfolioprojects (id, title, description, category, imageurl, isactive)
    VALUES 
    (%s, %L, %L, %L, %L, true),
    (%s, %L, %L, %L, %L, true),
    (%s, %L, %L, %L, %L, true),
    (%s, %L, %L, %L, %L, true),
    (%s, %L, %L, %L, %L, false)
  ',
    next_id,
    'Sunset Landscape Series',
    '<h2>A Beautiful Collection of Sunset Landscapes</h2><p>This series captures the breathtaking beauty of sunsets across different landscapes. Each piece showcases unique color palettes ranging from warm oranges and reds to cool purples and blues.</p><h3>Key Features:</h3><ul><li>High-resolution digital paintings</li><li>Vibrant color gradients</li><li>Emotional depth and atmosphere</li><li>Available in multiple sizes</li></ul><p><strong>Medium:</strong> Digital Art<br><strong>Year:</strong> 2024<br><strong>Collection:</strong> Nature Series</p>',
    'Digital Art',
    '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg',
    next_id + 1,
    'Abstract Geometric Patterns',
    '<h2>Modern Abstract Compositions</h2><p>A collection of abstract artworks featuring <strong>bold geometric patterns</strong> and contemporary design elements. These pieces explore the relationship between shape, color, and space.</p><h3>Artistic Approach:</h3><ol><li>Started with basic geometric shapes</li><li>Layered multiple patterns and textures</li><li>Applied vibrant color combinations</li><li>Refined composition for visual balance</li></ol><p><em>These works are inspired by modernist movements and contemporary design trends.</em></p>',
    'Abstract',
    '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg',
    next_id + 2,
    'Portrait Photography Collection',
    '<h2>Capturing Human Emotion</h2><p>This portrait series explores the <strong>depth of human emotion</strong> through carefully composed photographs. Each subject tells a unique story through their expression and body language.</p><h3>Technical Details:</h3><ul><li><strong>Camera:</strong> Canon EOS R5</li><li><strong>Lens:</strong> 85mm f/1.4</li><li><strong>Lighting:</strong> Natural and studio</li><li><strong>Processing:</strong> Adobe Lightroom & Photoshop</li></ul><p>Shot in various locations including urban settings, nature, and professional studios.</p>',
    'Photography',
    '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg',
    next_id + 3,
    'Watercolor Botanical Illustrations',
    '<h2>Delicate Flora Studies</h2><p>A series of <em>hand-painted watercolor illustrations</em> featuring various botanical subjects. These pieces celebrate the intricate beauty of plants and flowers.</p><h3>Collection Includes:</h3><ul><li>Wildflowers and garden blooms</li><li>Tropical plants and leaves</li><li>Herbs and medicinal plants</li><li>Seasonal botanical studies</li></ul><blockquote><p>"Nature always wears the colors of the spirit." - Ralph Waldo Emerson</p></blockquote><p>Each illustration is created using professional-grade watercolors on cold-press paper.</p>',
    'Illustration',
    '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg',
    next_id + 4,
    'Urban Architecture Study',
    '<h2>Modern Cityscapes and Structures</h2><p>An exploration of <strong>contemporary urban architecture</strong> through the lens of artistic photography and digital manipulation.</p><h3>Focus Areas:</h3><ul><li>Geometric building facades</li><li>Glass and steel structures</li><li>Reflections and symmetry</li><li>Night photography and lighting</li></ul><p>This project was completed over 6 months, documenting various cities and their unique architectural personalities.</p><p><strong>Featured Cities:</strong> New York, Tokyo, Dubai, London</p>',
    'Photography',
    '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg'
  );
  
  RAISE NOTICE 'Added 5 test portfolio projects starting from ID %', next_id;
END $$;

-- Verify the data
SELECT id, title, category, isactive FROM portfolioprojects ORDER BY id; 
(
  'Sunset Landscape Series',
  '<h2>A Beautiful Collection of Sunset Landscapes</h2>
<p>This series captures the breathtaking beauty of sunsets across different landscapes. Each piece showcases unique color palettes ranging from warm oranges and reds to cool purples and blues.</p>
<h3>Key Features:</h3>
<ul>
  <li>High-resolution digital paintings</li>
  <li>Vibrant color gradients</li>
  <li>Emotional depth and atmosphere</li>
  <li>Available in multiple sizes</li>
</ul>
<p><strong>Medium:</strong> Digital Art<br>
<strong>Year:</strong> 2024<br>
<strong>Collection:</strong> Nature Series</p>',
  'Digital Art',
  '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg',
  true
),
(
  'Abstract Geometric Patterns',
  '<h2>Modern Abstract Compositions</h2>
<p>A collection of abstract artworks featuring <strong>bold geometric patterns</strong> and contemporary design elements. These pieces explore the relationship between shape, color, and space.</p>
<h3>Artistic Approach:</h3>
<ol>
  <li>Started with basic geometric shapes</li>
  <li>Layered multiple patterns and textures</li>
  <li>Applied vibrant color combinations</li>
  <li>Refined composition for visual balance</li>
</ol>
<p><em>These works are inspired by modernist movements and contemporary design trends.</em></p>',
  'Abstract',
  '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg',
  true
),
(
  'Portrait Photography Collection',
  '<h2>Capturing Human Emotion</h2>
<p>This portrait series explores the <strong>depth of human emotion</strong> through carefully composed photographs. Each subject tells a unique story through their expression and body language.</p>
<h3>Technical Details:</h3>
<ul>
  <li><strong>Camera:</strong> Canon EOS R5</li>
  <li><strong>Lens:</strong> 85mm f/1.4</li>
  <li><strong>Lighting:</strong> Natural and studio</li>
  <li><strong>Processing:</strong> Adobe Lightroom & Photoshop</li>
</ul>
<p>Shot in various locations including urban settings, nature, and professional studios.</p>',
  'Photography',
  '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg',
  true
),
(
  'Watercolor Botanical Illustrations',
  '<h2>Delicate Flora Studies</h2>
<p>A series of <em>hand-painted watercolor illustrations</em> featuring various botanical subjects. These pieces celebrate the intricate beauty of plants and flowers.</p>
<h3>Collection Includes:</h3>
<ul>
  <li>Wildflowers and garden blooms</li>
  <li>Tropical plants and leaves</li>
  <li>Herbs and medicinal plants</li>
  <li>Seasonal botanical studies</li>
</ul>
<blockquote>
  <p>"Nature always wears the colors of the spirit." - Ralph Waldo Emerson</p>
</blockquote>
<p>Each illustration is created using professional-grade watercolors on cold-press paper.</p>',
  'Illustration',
  '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg',
  true
),
(
  'Urban Architecture Study',
  '<h2>Modern Cityscapes and Structures</h2>
<p>An exploration of <strong>contemporary urban architecture</strong> through the lens of artistic photography and digital manipulation.</p>
<h3>Focus Areas:</h3>
<ul>
  <li>Geometric building facades</li>
  <li>Glass and steel structures</li>
  <li>Reflections and symmetry</li>
  <li>Night photography and lighting</li>
</ul>
<p>This project was completed over 6 months, documenting various cities and their unique architectural personalities.</p>
<p><strong>Featured Cities:</strong> New York, Tokyo, Dubai, London</p>',
  'Photography',
  '/uploads/images/8ba675b9-c4e6-41e6-8f14-382b9ee1d019.jpg',
  false
);

-- Verify the data
SELECT id, title, category, isactive FROM portfolioprojects ORDER BY id;
