CREATE TABLE `docs` (
  `doc_id` int NOT NULL AUTO_INCREMENT,
  `doc_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `doc_description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `doc_date` datetime DEFAULT NULL,
  `doc_user_id` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`doc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


CREATE TABLE `docs_categorys` (
  `doc_cat_doc_id` int NOT NULL,
  `doc_cat_cat_id` int NOT NULL,
  PRIMARY KEY (`doc_cat_doc_id`, `doc_cat_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;