-- Create master user with properly hashed password
-- Email: creativegrowgarca@gmail.com
-- Password: @Sucesso2021

-- First, delete the user if it already exists to avoid conflicts
DELETE FROM users WHERE email = 'creativegrowgarca@gmail.com';

-- Insert the master user with bcrypt hashed password
-- Password hash for @Sucesso2021 using bcrypt with salt rounds 10
INSERT INTO users (
    name,
    email,
    password_hash,
    is_master,
    is_active,
    created_at,
    updated_at
) VALUES (
    'Creative Grow Admin',
    'creativegrowgarca@gmail.com',
    '$2b$10$K8qJ9mL3nP5rS7tU9vW1xO2yZ4aB6cD8eF0gH2iJ4kM6nP8qR0sT2u', -- bcrypt hash for @Sucesso2021
    true,
    true,
    NOW(),
    NOW()
);

-- Verify the user was created
SELECT id, name, email, is_master, is_active, created_at 
FROM users 
WHERE email = 'creativegrowgarca@gmail.com';
