-- Migration: Insert default task categories
-- Date: 2025-01-XX
-- Description: Creates default task categories (提案, レポート) as common categories for all companies
-- Company ID: 00000000-0000-0000-0000-000000000001

-- Insert default category: 提案
INSERT INTO task_categories (
    id,
    company_id,
    name,
    description,
    color,
    order_index,
    created_at,
    updated_at
)
VALUES (
    '10000000-0000-0000-0000-000000000001',
    '00000000-0000-0000-0000-000000000001',
    '提案',
    '提案関連のタスク',
    '#667eea',
    0,
    CURRENT_TIMESTAMP,
    CURRENT_TIMESTAMP
)
ON DUPLICATE KEY UPDATE
    name = VALUES(name),
    description = VALUES(description),
    color = VALUES(color),
    order_index = VALUES(order_index),
    updated_at = CURRENT_TIMESTAMP;

-- Insert default category: レポート
INSERT INTO task_categories (
    id,
    company_id,
    name,
    description,
    color,
    order_index,
    created_at,
    updated_at
)
VALUES (
    '10000000-0000-0000-0000-000000000002',
    '00000000-0000-0000-0000-000000000001',
    'レポート',
    'レポート関連のタスク',
    '#667eea',
    1,
    CURRENT_TIMESTAMP,
    CURRENT_TIMESTAMP
)
ON DUPLICATE KEY UPDATE
    name = VALUES(name),
    description = VALUES(description),
    color = VALUES(color),
    order_index = VALUES(order_index),
    updated_at = CURRENT_TIMESTAMP;

