-- Optional migration: create a dedicated `news` table (alternative to JSON storage)
-- Run this in your MySQL/ MariaDB database if you prefer DB-backed news storage.

CREATE TABLE IF NOT EXISTS `news` (
  `id` INT AUTO_INCREMENT PRIMARY KEY,
  `title` VARCHAR(255) NOT NULL,
  `content` TEXT NOT NULL,
  `image` VARCHAR(1024) DEFAULT NULL,
  `link` VARCHAR(1024) DEFAULT NULL,
  `highlight` TINYINT(1) DEFAULT 0,
  `created_at` INT NOT NULL,
  `updated_at` INT DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- Optional meta rows approach (single-row storage)
CREATE TABLE IF NOT EXISTS `site_meta` (
  `meta_key` VARCHAR(191) PRIMARY KEY,
  `meta_value` LONGTEXT
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
