-- Migration 048: Developer Debug Logs Table
-- Stores granular Android app activity logs when Developer Debug Mode is enabled.
-- Includes indexes for fast filtering by device, category, and time.

CREATE TABLE IF NOT EXISTS ftt_dev_debug_logs (
    id BIGINT AUTO_INCREMENT PRIMARY KEY,
    device_id VARCHAR(128),
    category VARCHAR(32),
    method VARCHAR(16),
    url TEXT,
    request_summary TEXT,
    response_summary TEXT,
    status_code INT,
    duration_ms INT,
    logged_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    INDEX idx_device (device_id),
    INDEX idx_cat (category),
    INDEX idx_logged (logged_at)
);
