<?php
declare(strict_types=1);

return [
    'up' => "
CREATE TABLE IF NOT EXISTS notification_sms_log (
    id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    phone VARCHAR(20) NOT NULL,
    message TEXT NOT NULL,
    channel ENUM('sms','whatsapp') NOT NULL DEFAULT 'sms',
    status ENUM('queued','sent','failed') NOT NULL DEFAULT 'queued',
    sent_at DATETIME NULL,
    error_message TEXT NULL,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    INDEX idx_phone (phone),
    INDEX idx_status (status),
    INDEX idx_created (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
",
    'down' => "DROP TABLE IF EXISTS notification_sms_log",
];
