CREATE TABLE `truth_social_content` (
  `article_id` VARCHAR(50) NOT NULL PRIMARY KEY,
  `user_id` VARCHAR(50) NOT NULL,
  `user_name` VARCHAR(100) NOT NULL,
  `timestamp` BIGINT NOT NULL,
  `date_time` VARCHAR(50) NOT NULL,
  `text` TEXT NOT NULL,
  `media_url` TEXT NULL,
  `media_type` VARCHAR(50) NULL,
  `media_thumbnail` TEXT NULL,
  `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- 对于 MySQL 8.0.29 之前的版本不支持 "ADD COLUMN IF NOT EXISTS"
-- 如需在已有表上添加列，请分别执行以下语句（每条仅需执行一次）
ALTER TABLE `truth_social_content`
    ADD COLUMN `media_url` TEXT NULL DEFAULT NULL AFTER `text`;
ALTER TABLE `truth_social_content`
    ADD COLUMN `media_type` VARCHAR(50) NULL DEFAULT NULL AFTER `media_url`;
ALTER TABLE `truth_social_content`
    ADD COLUMN `media_thumbnail` TEXT NULL DEFAULT NULL AFTER `media_type`;
