-- migrate:up
CREATE TABLE api_requests_log (
    id INT AUTO_INCREMENT PRIMARY KEY,         -- Unique identifier for each log entry
    request_url VARCHAR(2048) NOT NULL,        -- The full request URL, including query parameters
    request_method VARCHAR(10) NOT NULL,       -- The HTTP method (GET, POST, PUT, DELETE)
    request_headers TEXT,                      -- The headers sent with the request (JSON format)
    request_body TEXT,                         -- The body of the request (if applicable, JSON format)
    response_status INT,                       -- HTTP status code of the response
    response_body TEXT,                        -- The response body from the server (JSON format)
    response_time FLOAT,                       -- Time taken for the API call (in seconds)
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP -- Timestamp of when the log was created
);

-- migrate:down
DROP TABLE IF EXISTS api_requests_log;