-- SQL script to create admin user with specified credentials
-- Email: admin@donebro.in
-- Password: 123456 (hashed)

INSERT INTO `users` (
    `name`, 
    `email`, 
    `password`, 
    `is_admin`, 
    `is_verified`, 
    `current_plan_id`, 
    `created_at`, 
    `updated_at`
) VALUES (
    'Admin User',
    'admin@donebro.in',
    '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', -- Hash for '123456'
    1,
    1,
    NULL,
    NOW(),
    NOW()
) ON DUPLICATE KEY UPDATE 
    `name` = VALUES(`name`),
    `password` = VALUES(`password`),
    `is_admin` = VALUES(`is_admin`),
    `is_verified` = VALUES(`is_verified`),
    `updated_at` = NOW();

SELECT 'Admin user created successfully!' as message;
SELECT 'Email: admin@donebro.in' as email;
SELECT 'Password: 123456' as password;
