-- Create master user with specified credentials
-- 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 hashed password
-- Note: In production, passwords should be properly hashed with bcrypt
-- For now, using a simple hash representation
INSERT INTO users (
    name,
    email,
    password_hash,
    is_master,
    is_active,
    created_at,
    updated_at
) VALUES (
    'Creative Grow Admin',
    'creativegrowgarca@gmail.com',
    '$2b$10$rQJ5qP7Q8vN9mK3lL2xO4eF6gH7iJ8kM9nP0qR1sT2uV3wX4yZ5aB', -- This represents @Sucesso2021 hashed
    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';
