<?php
// Database configuration
$host = 'localhost';
$user = 'root';
$password = '';
$database = 'registrochamba';

try {
    // Create connection
    $conn = new mysqli($host, $user, $password, $database);
    
    // Read and execute SQL file
    $sql = file_get_contents('database/migrations/001_create_login_settings.sql');
    
    // Execute SQL
    if ($conn->multi_query($sql)) {
        echo "✅ Login settings table created successfully!\n";
    } else {
        echo "❌ Error creating table: " . $conn->error . "\n";
    }
    
    $conn->close();
    
} catch (Exception $e) {
    echo "❌ Database error: " . $e->getMessage() . "\n";
}
?>
