CREATE DATABASE IF NOT EXISTS radar_souk CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE radar_souk;

CREATE TABLE IF NOT EXISTS products (
  id INT PRIMARY KEY,
  title VARCHAR(255) NULL,
  price INT NULL,
  category VARCHAR(64) NULL,
  channel VARCHAR(64) NULL,
  handle VARCHAR(255) NULL,
  added VARCHAR(64) NULL,
  added_date DATE NULL,
  validated_date DATE NULL,
  status VARCHAR(32) NOT NULL DEFAULT 'discuter',
  sub_status VARCHAR(32) NULL,
  added_by VARCHAR(64) NULL,
  image LONGTEXT NULL,
  comments JSON NULL,
  votes JSON NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
