<?php
declare(strict_types=1);

return [
    'up' => "
CREATE TABLE IF NOT EXISTS player_notifications (
    id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
    player_id INT UNSIGNED NOT NULL,
    category VARCHAR(30) NOT NULL,
    title_ar VARCHAR(300) NOT NULL,
    body_ar TEXT NULL,
    data_json JSON NULL,
    is_read TINYINT(1) NOT NULL DEFAULT 0,
    read_at DATETIME NULL,
    created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    KEY idx_player_read (player_id, is_read, created_at),
    KEY idx_category (category)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
    'down' => "DROP TABLE IF EXISTS player_notifications",
];
