-- Database changes for the Lab Admin Reporting Session
-- Date: 2026-03-20

-- Note: Database updates are now AUTOMATED.
-- A migration script [migrate_db.php](file:///c:/xampp/htdocs/pathology/migrate_db.php) has been created.
-- This script runs automatically on the login page to ensure the following:
-- 1. 'sent_to_admin' column is added to 'bookings'
-- 2. 'report_layout' column is added to 'bookings'
-- 3. 'settings' table is created for global configurations

-- Manual SQL for reference:
ALTER TABLE bookings ADD COLUMN sent_to_admin TINYINT(1) DEFAULT 0;
ALTER TABLE bookings ADD COLUMN report_layout VARCHAR(20) DEFAULT 'classic';
CREATE TABLE IF NOT EXISTS settings (
    setting_key VARCHAR(50) PRIMARY KEY,
    setting_value TEXT,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
