+-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | oss_sup_doc | CREATE TABLE `oss_sup_doc` ( `oss_sup_doc_id` int(10) NOT NULL COMMENT 'Unique ID of the record (For system use only)', `sub_id` int(10) NOT NULL COMMENT 'Online Submission ID', `filename` varchar(100) NOT NULL COMMENT 'Form / document filename', `type` varchar(20) NOT NULL COMMENT 'Form / document type', `content` mediumblob DEFAULT NULL COMMENT 'The actual content of the uploaded form / document', `status` varchar(1) NOT NULL COMMENT 'Status\r\nP ¨C Pending Submission\r\nR ¨C Rejected\r\nS - Submitted', `create_dt` datetime NOT NULL COMMENT 'Date when the record was created', `created_by` varchar(25) NOT NULL COMMENT 'ID of the User who created the record', `lst_upd_dt` datetime NOT NULL COMMENT 'Date when the record was last updated', `lst_upd_by` varchar(25) NOT NULL COMMENT 'ID of the User who last updated the record', PRIMARY KEY (`oss_sup_doc_id`), KEY `fd_upload_FK` (`sub_id`), KEY `oss_sup_doc_status_IDX` (`status`) USING BTREE, KEY `oss_sup_doc_sub_id_IDX` (`sub_id`), CONSTRAINT `oss_sup_doc_FK` FOREIGN KEY (`sub_id`) REFERENCES `oss_sub` (`sub_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Supporting documents of a online form submission' | +-------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.000 sec)