CREATE TABLE ofs_options (

	`option_id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
	`option_name` VARCHAR(191) NOT NULL,
	`option_value` LONGTEXT NOT NULL

);

CREATE TABLE ofs_profiles (

	`profile_id` BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY,
	`json` json NOT NULL,
	`done` tinyint(1) NOT NULL

);

CREATE TABLE `ofs_posts` (
  `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `posted` timestamp NULL DEFAULT NULL,
  `post_id` int NOT NULL KEY,
  `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `profile_id` int NOT NULL,
  `profile_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `profile_username` text not null,
  `usernames` JSON NOT NULL,
  `price` float NOT NULL,
  `link` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `photos` int DEFAULT NULL,
  `videos` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
  KEY( `post_id` )
);
