-- migration_api_logs.sql
CREATE TABLE IF NOT EXISTS api_logs (
    id          INT AUTO_INCREMENT PRIMARY KEY,
    endpoint    VARCHAR(255)    NOT NULL,
    method      VARCHAR(10)     NOT NULL DEFAULT 'GET',
    request     MEDIUMTEXT,
    response    MEDIUMTEXT,
    status_code INT             DEFAULT NULL,
    created_at  DATETIME        DEFAULT CURRENT_TIMESTAMP,
    INDEX idx_created (created_at),
    INDEX idx_endpoint (endpoint(100))
);
