-- Create table for storing multiple documents per welfare request
CREATE TABLE IF NOT EXISTS welfare_documents (
    id INT AUTO_INCREMENT PRIMARY KEY,
    request_id VARCHAR(50) NOT NULL,
    document_path VARCHAR(500) NOT NULL,
    document_type VARCHAR(10) NOT NULL,
    uploaded_at DATETIME DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (request_id) REFERENCES welfare_requests(id) ON DELETE CASCADE,
    INDEX idx_request_id (request_id)
);
