<?php
/**
 * Configuration Template
 * Copy this to config/database.php and update with your values
 */

// Current working configuration
return [
    // Database host (usually localhost for local development)
    'host' => 'localhost',
    
    // Database name (will be created automatically if it doesn't exist)
    'dbname' => 'ussd_loan',
    
    // Database user
    'username' => 'root',
    
    // Database password
    'password' => 'incorrect',  // Update with actual password
];

/**
 * EXAMPLE CONFIGURATIONS FOR DIFFERENT ENVIRONMENTS
 */

// Local Development (uncomment to use)
/*
return [
    'host' => 'localhost',
    'dbname' => 'ussd_loan_dev',
    'username' => 'root',
    'password' => 'root',
];
*/

// Production Server (uncomment to use)
/*
return [
    'host' => 'db.example.com',
    'dbname' => 'ussd_loan_prod',
    'username' => 'db_user',
    'password' => 'secure_password_here',
];
*/

// Docker Container (uncomment to use)
/*
return [
    'host' => 'mysql',  // Docker service name
    'dbname' => 'ussd_loan',
    'username' => 'root',
    'password' => 'root_password',
];
*/

/**
 * NOTES
 * 
 * 1. Database will be created automatically if:
 *    - Host is accessible
 *    - Username/password are correct
 *    - User has CREATE DATABASE privilege
 * 
 * 2. Tables will be created automatically on first connection:
 *    - users (user accounts)
 *    - ussd_mpesa_credentials (M-Pesa config)
 *    - mpesa_stk_queue (STK requests)
 *    - contacts (customer contacts)
 * 
 * 3. Never commit actual passwords to version control
 *    - Use environment variables in production
 *    - Use .env files (not in repo)
 *    - Use secrets management tools
 */
