-- Dumping data for table `purchaseorder`
--

INSERT INTO `purchaseorder` (`id`, `plant_id`, `user_no`, `po_type`, `po_no`, `indent_no`, `vendor_no`, `broker_name`, `broker_per`, `discount`, `requirement_days`, `delivery_schedule_date`, `delivery_address`, `gross_total`, `gst_total`, `other_charges`, `net_total`, `terms_conditions`, `isgeneral`, `status`, `entry_by`, `entry_date`, `p_no1`, `is_security_receive`, `remark`, `approve_by`, `approve_date`, `vendor`, `accept_date`, `delivery_type`, `booking_location`, `disc_amt`, `shipping_handling`, `shipping_gst`, `final_total`, `department`, `transport`, `local_transport`, `billcompany_code`, `shipcompany_code`, `email`, `purchase_type`, `currancy`, `currancy_rate`, `term_local_transport`, `Po_Group`, `Fin_Year`, `rounding`, `additional_term`, `gstSplitData`, `narration`, `cancel_hold_date`, `cancel_hold_by`, `cancel_hold_reason`) VALUES
(546, '60', 'gmpdemo1', 'Raw Material', 'RM/PURHO/0051/2022-23', 'RM0001', 'V10001', '', '', 0.00, '', '', '', 40000.00, 4320.00, 0.00, 40320.00, '[{\"id\":\"17\",\"plant_id\":\"\",\"term_heading\":\"Terms and Condition\",\"term\":\"Product Quality should be Checked and Maintained\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 12:51:56\",\"status\":\"approve\",\"selected\":true},{\"id\":\"19\",\"plant_id\":\"\",\"term_heading\":\"Payment Terms\",\"term\":\"60 days\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 12:53:27\",\"status\":\"approve\",\"selected\":true}]', 'no', 'Approved', 'master', '2023-08-02 12:54:12', 0, 'No', 'ok', 'master', '2023-08-02 12:54:38', 'pending', '0000-00-00', '', '', 4000.00, 105.00, 5, 40425.00, '', '', '', 'C0001', 'C0001', '', 'Local Purchase', 'INR', '', '', 'RM', '2002-23', 0.00, '[{\"id\":\"9\",\"plant_id\":\"60\",\"additional_term\":\"Transportation Extra applicable.\",\"entry_date\":\"2023-08-02\",\"status\":\"\",\"entry_by\":\"master\",\"selected\":true}]', '[{\"id\":\"516\",\"percentage\":\"12.00\",\"igst\":0,\"sgst\":\"2160.00\",\"cgst\":\"2160.00\",\"totalGST\":\"4320.00\"}]', '', '', '', ''),
(547, '60', 'gmpdemo1', 'Raw Material', 'RM/PURHO/0052/2022-23', 'RM0002', 'V10646', '', '', 0.00, '', '', '', 156000.00, 26676.00, 0.00, 174876.00, '[{\"id\":\"17\",\"plant_id\":\"\",\"term_heading\":\"Terms and Condition\",\"term\":\"Product Quality should be Checked and Maintained\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 12:51:56\",\"status\":\"approve\",\"selected\":true},{\"id\":\"18\",\"plant_id\":\"\",\"term_heading\":\"Shipping\",\"term\":\"Should be shipped on the given timeline\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 12:52:38\",\"status\":\"approve\",\"selected\":true}]', 'no', 'Approved', 'master', '2023-08-03 04:16:03', 0, 'No', 'ok', 'master', '2023-08-03 04:16:11', 'pending', '0000-00-00', '', '', 7800.00, 0.00, 0, 174876.00, '', '', '', 'C0001', 'C0001', '', 'Local Purchase', 'INR', '', '', 'RM', '2002-23', 0.00, '[{\"id\":\"8\",\"plant_id\":\"60\",\"additional_term\":\"Refusal to accept increased payment term\",\"entry_date\":\"2023-08-02\",\"status\":\"\",\"entry_by\":\"master\",\"selected\":true}]', '[{\"id\":\"517\",\"percentage\":\"18.00\",\"igst\":0,\"sgst\":\"13338.00\",\"cgst\":\"13338.00\",\"totalGST\":\"26676.00\"}]', '', '', '', ''),
(548, '60', 'gmpdemo1', 'Raw Material', 'RM/PURHO/0053/2022-23', 'RM0003', 'V10647', '', '', 0.00, '', '', '', 40000.00, 2632.00, 0.00, 40232.00, '[{\"id\":\"18\",\"plant_id\":\"\",\"term_heading\":\"Shipping\",\"term\":\"Should be shipped on the given timeline\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 12:52:38\",\"status\":\"approve\",\"selected\":true}]', 'no', 'Approved', 'master', '2023-08-07 05:19:52', 0, 'No', 'ok', 'master', '2023-08-07 05:20:39', 'pending', '0000-00-00', '', '', 2400.00, 336.00, 12, 40568.00, '', 'Local Transport', '', 'C0001', 'C0001', '', 'Local Purchase', 'INR', '', '', 'RM', '2002-23', 0.00, '[{\"id\":\"8\",\"plant_id\":\"60\",\"additional_term\":\"Refusal to accept increased payment term\",\"entry_date\":\"2023-08-02\",\"status\":\"\",\"entry_by\":\"master\",\"selected\":true}]', '[{\"id\":\"518\",\"percentage\":\"7.00\",\"igst\":0,\"sgst\":\"1316.00\",\"cgst\":\"1316.00\",\"totalGST\":\"2632.00\"}]', '', '', '', ''),
(549, '60', 'gmpdemo1', 'Raw Material', 'RM/PURHO/0054/2022-23', 'RM0004', 'V10648', '', '', 0.00, '', '', '', 60000.00, 3420.00, 0.00, 60420.00, '[{\"id\":\"18\",\"plant_id\":\"\",\"term_heading\":\"Shipping\",\"term\":\"Should be shipped on the given timeline\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 12:52:38\",\"status\":\"approve\",\"selected\":true}]', 'no', 'Approved', 'master', '2023-08-08 03:33:31', 0, 'No', 'OK', 'master', '2023-08-08 03:34:16', 'pending', '0000-00-00', '', '', 3000.00, 336.00, 12, 60756.00, '', 'Local Transport', '', 'C0001', 'C0001', '', 'Local Purchase', 'INR', '', '', 'RM', '2002-23', 0.00, '[{\"id\":\"8\",\"plant_id\":\"60\",\"additional_term\":\"Refusal to accept increased payment term\",\"entry_date\":\"2023-08-02\",\"status\":\"\",\"entry_by\":\"master\",\"selected\":true}]', '[{\"id\":\"519\",\"percentage\":\"6.00\",\"igst\":0,\"sgst\":\"1710.00\",\"cgst\":\"1710.00\",\"totalGST\":\"3420.00\"}]', '', '', '', ''),
(550, '60', 'gmpdemo1', 'Raw Material', 'RM/PURHO/0055/2022-23', '', 'V10648', '', '0', 6.00, '', '', '', 30000.00, 1800.00, 0.00, 31800.00, '[{\"id\":\"18\",\"plant_id\":\"\",\"term_heading\":\"Shipping\",\"term\":\"Should be shipped on the given timeline\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 12:52:38\",\"status\":\"approve\",\"selected\":true}]', 'no', 'Approved', 'master', '2023-08-08 03:40:57', 0, 'No', 'OK', 'master', '2023-08-08 03:41:10', 'pending', '0000-00-00', '', '', 6.00, 336.00, 36, 32136.00, 'purchase', 'Local Transport', '', 'C0001', 'C0001', '', 'Local Purchase', '', '0', '', 'RM', '2002-23', 0.00, '[{\"id\":\"8\",\"plant_id\":\"60\",\"additional_term\":\"Refusal to accept increased payment term\",\"entry_date\":\"2023-08-02\",\"status\":\"\",\"entry_by\":\"master\",\"selected\":true}]', '[{\"percentage\":\"6.00\",\"igst\":0,\"sgst\":\"900.00\",\"cgst\":\"900.00\",\"totalGST\":\"1800.00\"}]', '', '', '', ''),
(551, '60', 'gmpdemo1', 'Raw Material', 'RM/PURHO/0056/2023-24', 'RM0005', 'V10651', '', '', 0.00, '', '', '', 60000.00, 2328.00, 0.00, 60528.00, '[{\"id\":\"18\",\"plant_id\":\"\",\"term_heading\":\"Shipping\",\"term\":\"Should be shipped on the given timeline\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 12:52:38\",\"status\":\"approve\",\"selected\":true}]', 'no', 'Approved', 'master', '2023-08-31 12:07:15', 0, 'No', 'OK', 'master', '2023-08-31 12:07:50', 'pending', '0000-00-00', '', '', 1800.00, 210.00, 5, 60738.00, '', 'Local Transport', '', 'C0001', 'C0001', '', 'Local Purchase', 'INR', '', '', 'RM', '2002-23', 0.00, '[{\"id\":\"8\",\"plant_id\":\"60\",\"additional_term\":\"Refusal to accept increased payment term\",\"entry_date\":\"2023-08-02\",\"status\":\"\",\"entry_by\":\"master\",\"selected\":true}]', '[{\"id\":\"520\",\"percentage\":\"4.00\",\"igst\":0,\"sgst\":\"1164.00\",\"cgst\":\"1164.00\",\"totalGST\":\"2328.00\"}]', '', '', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `qa_master`
--

CREATE TABLE `qa_master` (
  `id` int NOT NULL,
  `plant_id` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `qa_tn_employees`
--

CREATE TABLE `qa_tn_employees` (
  `id` int NOT NULL,
  `Plant_id` int NOT NULL,
  `user_no` int NOT NULL,
  `tn_no` varchar(20) NOT NULL,
  `emp_id` varchar(20) NOT NULL,
  `attendance` varchar(50) NOT NULL,
  `exam` varchar(50) NOT NULL,
  `total_marks` varchar(50) NOT NULL,
  `result` varchar(50) NOT NULL,
  `feedback` varchar(50) NOT NULL,
  `question` varchar(150) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `qa_training_needs`
--

CREATE TABLE `qa_training_needs` (
  `id` int NOT NULL,
  `Plant_id` int NOT NULL,
  `user_no` int NOT NULL,
  `department` varchar(50) NOT NULL,
  `subject` varchar(100) NOT NULL,
  `other_subject` varchar(100) NOT NULL,
  `reference_document` varchar(150) NOT NULL,
  `training_needs` varchar(150) NOT NULL,
  `proposed_trainer` varchar(100) NOT NULL,
  `proposed_date` date NOT NULL,
  `status` varchar(50) NOT NULL,
  `entry_by` varchar(50) NOT NULL,
  `entry_date` date NOT NULL,
  `training_date` date NOT NULL,
  `training_time` time(6) NOT NULL,
  `trainer_name` varchar(50) NOT NULL,
  `venue` varchar(50) NOT NULL,
  `approve_by` varchar(50) NOT NULL,
  `approve_date` varchar(50) NOT NULL,
  `attendance` varchar(50) NOT NULL,
  `training_tools` varchar(100) NOT NULL,
  `training_start_time` time(6) NOT NULL,
  `training_end_time` time(6) NOT NULL,
  `questinaries` varchar(200) NOT NULL,
  `evaluator_name` varchar(50) NOT NULL,
  `duration` varchar(50) NOT NULL,
  `total_marks` varchar(50) NOT NULL,
  `question` varchar(200) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `qc_testing_results`
--

CREATE TABLE `qc_testing_results` (
  `id` int NOT NULL,
  `test_no` int NOT NULL,
  `test_name` int NOT NULL,
  `sub_test` int NOT NULL,
  `description` int NOT NULL,
  `reference_type` int NOT NULL,
  `limits` int NOT NULL,
  `result` int NOT NULL,
  `status` int NOT NULL,
  `tested_by` int NOT NULL,
  `checked_by` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `qms_training`
--

CREATE TABLE `qms_training` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `department` varchar(50) NOT NULL,
  `subject` varchar(50) NOT NULL,
  `training_on` varchar(50) NOT NULL,
  `equipment` varchar(50) NOT NULL,
  `equipment_id` varchar(50) NOT NULL,
  `description` text NOT NULL,
  `employeeList` mediumtext NOT NULL,
  `proposed_date` date NOT NULL,
  `proposed_trainer` varchar(50) NOT NULL,
  `entry_by` varchar(50) NOT NULL,
  `entry_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `qualification`
--

CREATE TABLE `qualification` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `qualification` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `qualification`
--

INSERT INTO `qualification` (`id`, `plant_id`, `user_no`, `qualification`, `status`, `entry_by`, `entry_date`, `approve_by`, `approve_date`) VALUES
(24, '', 'gmpdemo1', 'BBA', 'active', 'master', '2023-08-02 10:59:59', '', ''),
(25, '', 'gmpdemo1', 'BCA', 'active', 'master', '2023-08-03 11:02:12', '', ''),
(26, '', 'gmpdemo1', 'MCA', 'active', 'master', '2023-08-03 11:02:18', '', ''),
(27, '', 'gmpdemo1', 'MBA', 'active', 'master', '2023-08-03 11:02:26', '', ''),
(28, '', 'gmpdemo1', 'M.COM', 'active', 'master', '2023-08-23 12:36:49', '', ''),
(29, '', 'gmpdemo1', 'BSC', 'active', 'master', '2023-08-23 12:37:12', '', ''),
(30, '', 'gmpdemo1', 'MSC', 'active', 'master', '2023-08-23 12:37:22', '', ''),
(31, '', 'gmpdemo1', 'BCOM', 'active', 'master', '2023-08-23 12:37:32', '', ''),
(36, '', 'gmpdemo1', 'B.TECH.', 'active', 'master', '2023-08-26 13:22:56', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `qualification_request`
--

CREATE TABLE `qualification_request` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `department_name` varchar(50) NOT NULL,
  `section_name` varchar(50) NOT NULL,
  `equip_name` varchar(50) NOT NULL,
  `make` varchar(50) NOT NULL,
  `capacity` int NOT NULL,
  `entry_date` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `quotation`
--

CREATE TABLE `quotation` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `quotation_no` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vendor_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `documents` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `status` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `q_no1` int NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `selected_approver` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `quotation`
--
DELIMITER $$
CREATE TRIGGER `quotation_no_insert` BEFORE INSERT ON `quotation` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM quotation ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.quotation_no = concat('QO-', LPAD(CONVERT(@lastID, CHAR), 3, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `quotation_dtl`
--

CREATE TABLE `quotation_dtl` (
  `id` int NOT NULL,
  `quotation_type` varchar(25) NOT NULL,
  `quotation_hdr_id` int NOT NULL,
  `material_id` int NOT NULL,
  `material_code` varchar(25) NOT NULL,
  `quotation_amt` decimal(6,2) NOT NULL,
  `tax_applicable` varchar(3) NOT NULL,
  `gst_per` int NOT NULL,
  `pack_size` varchar(15) NOT NULL,
  `pack_unit` varchar(15) NOT NULL,
  `quotation_per` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `quotation_dtl`
--

INSERT INTO `quotation_dtl` (`id`, `quotation_type`, `quotation_hdr_id`, `material_id`, `material_code`, `quotation_amt`, `tax_applicable`, `gst_per`, `pack_size`, `pack_unit`, `quotation_per`) VALUES
(645, 'Local', 651, 635, 'RM00012', 400.00, 'Yes', 12, '30', 'Kg', 'Kg'),
(646, 'Local', 652, 636, 'RM00013', 520.00, 'Yes', 18, '30', 'Kg', 'Kg'),
(647, 'Local', 653, 637, 'RM00014', 200.00, 'Yes', 7, '100', 'Kg', 'Kg'),
(648, 'Local', 654, 638, 'RM00015', 300.00, 'Yes', 6, '5', 'Kg', 'Kg'),
(649, 'Local', 655, 643, 'RM000653', 200.00, 'Yes', 4, '100', 'Kg', 'Kg');

-- --------------------------------------------------------

--
-- Table structure for table `quotation_hdr`
--

CREATE TABLE `quotation_hdr` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `material_type` varchar(50) NOT NULL,
  `quotation_no` varchar(15) NOT NULL,
  `vendor_quotation_no` varchar(15) NOT NULL,
  `vendor_id` int NOT NULL,
  `entry_date` datetime DEFAULT CURRENT_TIMESTAMP,
  `entry_by` varchar(10) NOT NULL,
  `status` varchar(10) NOT NULL DEFAULT 'pending',
  `doc_url` varchar(1000) NOT NULL,
  `approve_by` varchar(25) NOT NULL,
  `approve_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `quotation_hdr`
--

INSERT INTO `quotation_hdr` (`id`, `plant_id`, `material_type`, `quotation_no`, `vendor_quotation_no`, `vendor_id`, `entry_date`, `entry_by`, `status`, `doc_url`, `approve_by`, `approve_date`) VALUES
(651, 60, 'Raw Material', 'Q-0001', '35', 645, '2023-08-02 12:46:53', 'master', 'approve', 'quotation-Ankita Bhausaheb Godase Resume.pdf', 'master', '2023-08-02 12:46:58'),
(652, 60, 'Raw Material', 'Q-0002', '243', 646, '2023-08-03 03:59:36', 'master', 'approve', '', 'master', '2023-08-03 03:59:41'),
(653, 60, 'Raw Material', 'Q-0003', 'QC035', 647, '2023-08-07 05:05:45', 'master', 'approve', 'quotation-NEW TAKRAR ARJA.pdf', 'master', '2023-08-07 05:05:55'),
(654, 60, 'Raw Material', 'Q-0004', 'QC032', 648, '2023-08-08 03:31:10', 'master', 'approve', '', 'master', '2023-08-08 03:31:16'),
(655, 60, 'Raw Material', 'Q-0005', 'QC06682', 651, '2023-08-31 11:45:08', 'master', 'approve', 'quotation-Preventive maintenance schedule.pdf', 'master', '2023-08-31 11:45:13');

-- --------------------------------------------------------

--
-- Stand-in structure for view `quotation_rates_by_product`
-- (See below for the actual view)
--
CREATE TABLE `quotation_rates_by_product` (
`gst_per` int
,`material_code` varchar(25)
,`material_id` int
,`quotation_amt` decimal(6,2)
,`quotation_no` varchar(15)
,`quotation_per` varchar(15)
,`tax_applicable` varchar(3)
,`vendor_id` int
,`vendor_name` varchar(100)
,`vendor_no` varchar(20)
);

-- --------------------------------------------------------

--
-- Table structure for table `rack`
--

CREATE TABLE `rack` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `section` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rack_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rack_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `capacity` decimal(10,2) NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `empty` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'yes',
  `material_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qty` decimal(10,2) NOT NULL,
  `material_unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ratemrp`
--

CREATE TABLE `ratemrp` (
  `id` int NOT NULL,
  `product_code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `category` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `client_code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rate` decimal(10,2) NOT NULL,
  `entry_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rate_for` decimal(10,2) NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rate_unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `raw_material`
--

CREATE TABLE `raw_material` (
  `id` int NOT NULL,
  `plant_id` varchar(20) NOT NULL,
  `user_no` varchar(20) NOT NULL DEFAULT 'gmpdemo1',
  `material_code` varchar(20) NOT NULL,
  `batch_no` varchar(20) NOT NULL,
  `vendor_no` varchar(20) NOT NULL,
  `order_qty` decimal(10,2) NOT NULL,
  `unit` varchar(20) NOT NULL,
  `received_qty` decimal(10,2) NOT NULL,
  `accept_qty` decimal(10,2) NOT NULL,
  `containers` int NOT NULL,
  `mfg_date` varchar(20) NOT NULL,
  `exp_date` varchar(20) NOT NULL,
  `inword_details` text NOT NULL,
  `received_by` varchar(20) NOT NULL,
  `entry_date` datetime DEFAULT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `receiving` varchar(20) NOT NULL DEFAULT 'pending',
  `coa_received` varchar(20) NOT NULL,
  `receiving_details` text NOT NULL,
  `dedusting` varchar(20) NOT NULL DEFAULT 'pending',
  `dedusting_details` text NOT NULL,
  `damage` varchar(20) NOT NULL DEFAULT 'pending',
  `damage_details` text NOT NULL,
  `weighing` varchar(20) NOT NULL DEFAULT 'pending',
  `weighing_details` text NOT NULL,
  `grn` varchar(20) NOT NULL DEFAULT 'pending',
  `labels` varchar(20) NOT NULL DEFAULT 'pending',
  `grn_details` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `raw_materials_table`
--

CREATE TABLE `raw_materials_table` (
  `material_subtype` varchar(1000) NOT NULL,
  `material_name` varchar(1000) NOT NULL,
  `material_Code` varchar(500) NOT NULL,
  `plant_id` varchar(50) NOT NULL,
  `product_code` varchar(500) NOT NULL,
  `uid` varchar(500) NOT NULL,
  `id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `receving`
--

CREATE TABLE `receving` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `standard_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `challan_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `challan_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tax_invoice` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `po_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `po_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vendor_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime(6) NOT NULL,
  `gross_total` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gst_total` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `net_total` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `standards` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `batches` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `received_qty` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `containerTotal` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pack_size` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `challan_qty` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `packing_condition` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `outer_packing` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `container_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `container_subtype` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `refregirator_temp_record`
--

CREATE TABLE `refregirator_temp_record` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `refrig_id` varchar(20) NOT NULL,
  `thermometer_id` varchar(20) NOT NULL,
  `observed_temp` int NOT NULL,
  `min_temp` int NOT NULL,
  `max_temp` int NOT NULL,
  `entry_by` varchar(20) NOT NULL,
  `checked_by` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `refrigerator_cleaning`
--

CREATE TABLE `refrigerator_cleaning` (
  `id` int NOT NULL,
  `disinfect` varchar(50) NOT NULL,
  `clean_by` varchar(50) NOT NULL,
  `remark` varchar(50) NOT NULL,
  `entry_by` varchar(50) NOT NULL,
  `entry_time` time NOT NULL,
  `entry_date` date NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `refrigerator_log`
--

CREATE TABLE `refrigerator_log` (
  `id` int NOT NULL,
  `plant_id` varchar(20) NOT NULL,
  `equipment_id` varchar(20) NOT NULL,
  `entry_date` date NOT NULL,
  `entry_time` datetime NOT NULL,
  `disinfectant_used` varchar(50) NOT NULL,
  `remark` varchar(50) NOT NULL,
  `cleaned_by` varchar(20) NOT NULL,
  `used_by` varchar(20) NOT NULL,
  `checked_by` varchar(20) NOT NULL,
  `approved_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `rejection`
--

CREATE TABLE `rejection` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `receiving_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `containers` decimal(10,2) NOT NULL,
  `rejected_qty` decimal(10,2) NOT NULL,
  `reason` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `action_taken` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rejected_area` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `location` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inform` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rejection_destruction`
--

CREATE TABLE `rejection_destruction` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `rejection_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `steps` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rejection_online`
--

CREATE TABLE `rejection_online` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `department` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_type` varchar(300) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_name` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grade` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_size` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `lot_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stage` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rejected_quantity` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_name` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_id` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rejection_type` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime DEFAULT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `qa_approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qa_approve_date` datetime DEFAULT NULL,
  `equipment_used` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `location` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `detailofcemical` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rejection_rawpacking`
--

CREATE TABLE `rejection_rawpacking` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `department` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_type` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_name` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `arno` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grn` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `containers_total` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `containers_rejected` int NOT NULL,
  `quantity_received` int NOT NULL,
  `rejected_quantity` int NOT NULL,
  `rejection_reason` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `receiving_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isRejectionArea` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reason` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `storage_location` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `supplier_inform` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reject_action` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `store_approve_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `store_approve_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qa_approve_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qa_approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `requisition`
--

CREATE TABLE `requisition` (
  `id` int NOT NULL,
  `plant_id` varchar(20) NOT NULL,
  `item_name` varchar(50) NOT NULL,
  `stock_qty` varchar(50) NOT NULL,
  `indend_qty` varchar(50) NOT NULL,
  `entry_by` varchar(50) NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `resignation`
--

CREATE TABLE `resignation` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `emp_name` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `emp_id` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `designation` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `expected_notice` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `expected_releaving` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reason` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `resignation_status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `resignation_remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `resignation_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `resignation_date` date NOT NULL,
  `exitinterview_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `releaving_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_letter` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `department` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dept_resignation_remark` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
  `dept_resignation_status` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `resignation_clearnace`
--

CREATE TABLE `resignation_clearnace` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `resignation_id` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `due_status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `emp_id` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `subject` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `releaving_date` date NOT NULL,
  `emp_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `designation` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `retest`
--

CREATE TABLE `retest` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grn_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ar_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `release_date` date NOT NULL,
  `retest_date` date NOT NULL,
  `qty` decimal(10,2) NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfg_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qc_person` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qc_alternate_person` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `micro_person` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `micro_alternate_person` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `retraining`
--

CREATE TABLE `retraining` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `emp_id` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `training_date` date NOT NULL,
  `reason` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `trainer` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `trainer_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `marks` decimal(10,2) NOT NULL,
  `remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dept_approval` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rinse_analysis`
--

CREATE TABLE `rinse_analysis` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `equip_name` varchar(50) NOT NULL,
  `batch_code` varchar(50) NOT NULL,
  `doa` date NOT NULL,
  `dor` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `rinse_analysis_dtl`
--

CREATE TABLE `rinse_analysis_dtl` (
  `id` int NOT NULL,
  `ra_id` varchar(20) NOT NULL,
  `micro_organism` varchar(50) NOT NULL,
  `observation_control` varchar(50) NOT NULL,
  `incubation_period` varchar(50) NOT NULL,
  `entry_by` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `risk_departments`
--

CREATE TABLE `risk_departments` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `risk_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `comment` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `risk_identification`
--

CREATE TABLE `risk_identification` (
  `id` int NOT NULL,
  `plant_id` varchar(20) NOT NULL,
  `user_no` varchar(20) NOT NULL DEFAULT 'gmpdemo1',
  `department` varchar(50) NOT NULL,
  `section` varchar(50) NOT NULL,
  `identification` varchar(200) NOT NULL,
  `usages_for` varchar(200) NOT NULL,
  `risk_form` varchar(200) NOT NULL,
  `description` text NOT NULL,
  `justification` text NOT NULL,
  `qty_impact` varchar(20) NOT NULL,
  `impact_strength` varchar(20) NOT NULL,
  `human_impact` varchar(20) NOT NULL,
  `risk_strength` varchar(20) NOT NULL,
  `product_code` varchar(20) NOT NULL,
  `batch_no` varchar(20) NOT NULL,
  `lot_no` varchar(20) NOT NULL,
  `equipment_code` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) NOT NULL,
  `entry_date` datetime NOT NULL,
  `details` text NOT NULL,
  `assessment` varchar(20) NOT NULL DEFAULT 'pending',
  `analysis` varchar(20) NOT NULL DEFAULT 'pending',
  `evaluation` varchar(20) NOT NULL DEFAULT 'pending',
  `control` varchar(20) NOT NULL DEFAULT 'pending',
  `review` varchar(20) NOT NULL DEFAULT 'pending',
  `review_by` varchar(20) NOT NULL,
  `review_date` datetime DEFAULT NULL,
  `comment` text NOT NULL,
  `capa` varchar(5) NOT NULL,
  `risk_control` varchar(5) NOT NULL,
  `impact_quality` varchar(5) NOT NULL,
  `close_comment` text NOT NULL,
  `close_by` varchar(20) NOT NULL,
  `close_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_chemical`
--

CREATE TABLE `rnd_chemical` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `chemical_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `chemical_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `molecular_wt` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pack_size` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cas_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grade` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `make` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `rnd_chemical`
--
DELIMITER $$
CREATE TRIGGER `rnd_chemical_no_insert` BEFORE INSERT ON `rnd_chemical` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_chemical ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.chemical_no = concat('C1', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_controlsample_rack`
--

CREATE TABLE `rnd_controlsample_rack` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `rack_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rack_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `subrack` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_control_sample`
--

CREATE TABLE `rnd_control_sample` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `cs_id` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_size` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ar_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `analysis_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `release_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfg_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `done_by` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_quantity` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pack_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rack_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checked_by` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `room_temp` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `humidity` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `cs_id1` int NOT NULL,
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `rnd_control_sample`
--
DELIMITER $$
CREATE TRIGGER `rnd_control_sample_no_insert` BEFORE INSERT ON `rnd_control_sample` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_control_sample ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.cs_id = concat('CS-', LPAD(CONVERT(@lastID, CHAR), 3, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_dev_optimisation`
--

CREATE TABLE `rnd_dev_optimisation` (
  `id` int NOT NULL,
  `user_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `dev_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_size` decimal(10,2) NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `trial_title` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `objective` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `procedures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipments` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testings` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `observations` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `optimisation` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `rnd_dev_optimisation`
--
DELIMITER $$
CREATE TRIGGER `rnd_dev_optimisation_no` BEFORE INSERT ON `rnd_dev_optimisation` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_dev_optimisation ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.dev_no = concat('DEV', LPAD(CONVERT(@lastID, CHAR), 3, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_dev_trial`
--

CREATE TABLE `rnd_dev_trial` (
  `id` int NOT NULL,
  `user_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `dev_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_size` decimal(10,2) NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'kg',
  `trial_title` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `objective` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `optimisation` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `rnd_dev_trial`
--
DELIMITER $$
CREATE TRIGGER `rnd_dev_trial_no` BEFORE INSERT ON `rnd_dev_trial` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_dev_trial ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.dev_no = concat('DEV', LPAD(CONVERT(@lastID, CHAR), 3, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_dev_trials`
--

CREATE TABLE `rnd_dev_trials` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `dev_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `procedures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipments` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testings` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `observations` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `optimisation` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'no',
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_equipment`
--

CREATE TABLE `rnd_equipment` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `equipment_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_code` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `make` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `capacity` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `min_capacity` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `max_capacity` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `category` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Fix',
  `department` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `section` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `purchase_date` date NOT NULL,
  `installation_date` date NOT NULL,
  `model` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_sr_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_used` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `e_no1` int NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `calibration` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Not Required',
  `calibration_parameter` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `process` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `from_range` decimal(10,2) NOT NULL,
  `from_range_uom` varchar(6) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `to_range` decimal(10,2) NOT NULL,
  `to_range_uom` varchar(6) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `plant_id` int NOT NULL DEFAULT '28'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_glassware`
--

CREATE TABLE `rnd_glassware` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `glassware_no` varchar(6) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `capacity` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `glassware_class` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `make` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `rnd_glassware`
--
DELIMITER $$
CREATE TRIGGER `rnd_glassware_no_insert` BEFORE INSERT ON `rnd_glassware` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_glassware ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.glassware_no = concat('G1', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_hplc`
--

CREATE TABLE `rnd_hplc` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `hplc_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `packing` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `brand` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `particle_size` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `rnd_hplc`
--
DELIMITER $$
CREATE TRIGGER `rnd_hplc_no_insert` BEFORE INSERT ON `rnd_hplc` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_hplc ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.hplc_no = concat('H1', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_indicator`
--

CREATE TABLE `rnd_indicator` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `indicator_no` char(6) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `indicator` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `acid_color` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `base_color` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ph_range` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pka` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_material`
--

CREATE TABLE `rnd_material` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `material_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_subtype` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grade` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cas_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `upac_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_nature` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `standard_qty` decimal(10,2) NOT NULL,
  `role` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Active',
  `country` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ownership` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `artwork_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inventory` int NOT NULL DEFAULT '10',
  `location` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `thera` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `storage_condition` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `special_grade` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `order_qty` decimal(10,2) NOT NULL,
  `unit` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `category` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `retest` decimal(10,2) NOT NULL,
  `shelf_life` decimal(10,2) NOT NULL,
  `min_shelf` decimal(10,2) NOT NULL,
  `lead_time` decimal(10,2) NOT NULL,
  `equivalent` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `hsn` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isprinted` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `for_product` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `m_id1` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `rnd_material`
--
DELIMITER $$
CREATE TRIGGER `rnd_material_code` BEFORE INSERT ON `rnd_material` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_material ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.material_code = concat('M1', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_optimisation_trials`
--

CREATE TABLE `rnd_optimisation_trials` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `dev_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `procedures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipments` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testings` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `observations` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `optimisation` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'no',
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_predev`
--

CREATE TABLE `rnd_predev` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `dev_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `proposed_route` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dosage_form` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `delivery_system` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `strength` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `container_closure` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `quality_criteria` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sterility` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stability` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `temp` decimal(10,0) NOT NULL,
  `humidity` decimal(10,0) NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `rnd_predev`
--
DELIMITER $$
CREATE TRIGGER `predev_no_insert` BEFORE INSERT ON `rnd_predev` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_predev ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.dev_no = concat('DEV', LPAD(CONVERT(@lastID, CHAR), 3, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_product`
--

CREATE TABLE `rnd_product` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'gmpdemo1',
  `product_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `product_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `generic_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `grade` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `packing_style` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `dosage_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `dosage_form` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `label_claim` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `packing_mode` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `min_shelf` decimal(10,2) NOT NULL,
  `thera` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `testing_time` decimal(10,2) NOT NULL,
  `retest_period` decimal(10,2) NOT NULL,
  `division` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `sale_ts` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `shelf_life` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `hsn` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `gtin` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `gst` int NOT NULL,
  `category` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mfg_lic` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `pack_desc` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `apperance` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `storage_condition` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `market` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `mrp` decimal(10,2) NOT NULL,
  `manufactured_under` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `manufactured_for` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `product_lic` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `fsc` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `copp` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `artwork` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `artwork_status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `manufactured_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Triggers `rnd_product`
--
DELIMITER $$
CREATE TRIGGER `rnd_product_code_insert` BEFORE INSERT ON `rnd_product` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_product ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.product_code = concat('P1', LPAD(CONVERT(@lastID, CHAR), 5, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_risk_departments`
--

CREATE TABLE `rnd_risk_departments` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `risk_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `comment` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_risk_identification`
--

CREATE TABLE `rnd_risk_identification` (
  `id` int NOT NULL,
  `user_no` varchar(20) NOT NULL DEFAULT 'gmpdemo1',
  `department` varchar(50) NOT NULL,
  `section` varchar(50) NOT NULL,
  `identification` varchar(200) NOT NULL,
  `usages_for` varchar(200) NOT NULL,
  `risk_form` varchar(200) NOT NULL,
  `description` text NOT NULL,
  `justification` text NOT NULL,
  `qty_impact` varchar(20) NOT NULL,
  `impact_strength` varchar(20) NOT NULL,
  `human_impact` varchar(20) NOT NULL,
  `risk_strength` varchar(20) NOT NULL,
  `product_code` varchar(20) NOT NULL,
  `batch_no` varchar(20) NOT NULL,
  `lot_no` varchar(20) NOT NULL,
  `equipment_code` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) NOT NULL,
  `entry_date` datetime NOT NULL,
  `details` text NOT NULL,
  `assessment` varchar(20) NOT NULL DEFAULT 'pending',
  `analysis` varchar(20) NOT NULL DEFAULT 'pending',
  `evaluation` varchar(20) NOT NULL DEFAULT 'pending',
  `control` varchar(20) NOT NULL DEFAULT 'pending',
  `review` varchar(20) NOT NULL DEFAULT 'pending',
  `review_by` varchar(20) NOT NULL,
  `review_date` datetime DEFAULT NULL,
  `comment` text NOT NULL,
  `capa` varchar(5) NOT NULL,
  `risk_control` varchar(5) NOT NULL,
  `impact_quality` varchar(5) NOT NULL,
  `close_comment` text NOT NULL,
  `close_by` varchar(20) NOT NULL,
  `close_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_techtransfer`
--

CREATE TABLE `rnd_techtransfer` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tech_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `receive_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_size` decimal(10,2) NOT NULL,
  `documentations` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `raw_materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `packing_materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vendors` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `activities` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `rnd_volumetric_master`
--

CREATE TABLE `rnd_volumetric_master` (
  `id` int NOT NULL,
  `user_no` varchar(20) NOT NULL DEFAULT 'gmpdemo1',
  `master_no` varchar(10) NOT NULL,
  `solution_name` varchar(200) NOT NULL,
  `percentage` decimal(10,2) NOT NULL,
  `unit` varchar(20) NOT NULL,
  `strength` varchar(100) NOT NULL,
  `standard_type` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) NOT NULL,
  `approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Triggers `rnd_volumetric_master`
--
DELIMITER $$
CREATE TRIGGER `rnd_volumetric_master_no` BEFORE INSERT ON `rnd_volumetric_master` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM rnd_volumetric_master ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.master_no = concat('S1', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `salary_annexure`
--

CREATE TABLE `salary_annexure` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `emp_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `employee_type` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `medical_checkup` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gross_salary` decimal(8,2) NOT NULL,
  `fixed_earnings_total` decimal(10,2) NOT NULL,
  `calculateble_gross` decimal(10,2) NOT NULL,
  `total_earnings` double(10,2) NOT NULL,
  `total_deductions` double(10,2) NOT NULL,
  `ctc_deductions` decimal(10,2) NOT NULL,
  `total_ctc` decimal(10,2) NOT NULL,
  `take_home_salary` decimal(10,2) NOT NULL,
  `ctc_annual` decimal(10,2) NOT NULL,
  `entry_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `salary_annexure`
--

INSERT INTO `salary_annexure` (`id`, `plant_id`, `user_no`, `emp_id`, `type`, `employee_type`, `medical_checkup`, `gross_salary`, `fixed_earnings_total`, `calculateble_gross`, `total_earnings`, `total_deductions`, `ctc_deductions`, `total_ctc`, `take_home_salary`, `ctc_annual`, `entry_by`, `entry_date`, `status`) VALUES
(9, '60', 'gmpdemo1', '76', 'Employee', 'Officer', 'Post Joini', 25000.00, 0.00, 0.00, 24805.00, 195.00, 290.00, 25000.00, 24515.00, 300000.00, 'master', '2023-08-03 11:19:31', 'Pending'),
(10, '60', 'gmpdemo1', '511', 'Employee', 'Officer', '', 25000.00, 0.00, 0.00, 24805.00, 195.00, 290.00, 25000.00, 24515.00, 300000.00, 'master', '2023-08-03 11:34:33', 'Pending'),
(11, '60', 'gmpdemo1', 'EC06', 'Employee', 'Officer', '', 25000.00, 0.00, 0.00, 23998.84, 1001.16, 290.00, 25000.00, 23708.84, 300000.00, 'master', '2023-08-03 11:38:04', 'Pending'),
(12, '60', 'gmpdemo1', 'EC04', 'Employee', 'Manager', '', 20000.00, 0.00, 0.00, 19169.67, 830.33, 302.00, 20000.00, 18867.67, 240000.00, 'master', '2023-08-03 12:57:47', 'Pending'),
(13, '60', 'gmpdemo1', 'EC002', 'Employee', 'Manager', '', 20000.00, 0.00, 0.00, 19169.67, 830.33, 302.00, 20000.00, 18867.67, 240000.00, 'master', '2023-09-04 02:33:53', 'Pending');

-- --------------------------------------------------------

--
-- Table structure for table `salary_annexure_details`
--

CREATE TABLE `salary_annexure_details` (
  `id` int NOT NULL,
  `salary_annexure_id` int NOT NULL,
  `salary_group` varchar(150) NOT NULL,
  `description` varchar(150) NOT NULL,
  `per_month` decimal(10,2) NOT NULL,
  `per_annum` decimal(10,2) NOT NULL,
  `emp_id` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `salary_annexure_details`
--

INSERT INTO `salary_annexure_details` (`id`, `salary_annexure_id`, `salary_group`, `description`, `per_month`, `per_annum`, `emp_id`) VALUES
(93, 9, 'Earnings', 'Basic Salary', 750.00, 9000.00, ''),
(94, 9, 'Earnings', 'HRA', 15.00, 180.00, ''),
(95, 9, 'Earnings', 'Special Allowance', 24040.00, 288480.00, ''),
(96, 9, 'Deductions', 'Professional Tax', 200.00, 2400.00, ''),
(97, 9, 'Deductions', 'PF Contribution By Employee', 90.00, 1080.00, ''),
(98, 9, 'CTC Calculations', 'PF Contribution By Employer', 97.00, 1164.00, ''),
(99, 9, 'CTC Calculations', 'Bonus', 62.00, 744.00, ''),
(100, 9, 'CTC Calculations', 'Gratuity', 36.00, 432.00, ''),
(101, 10, 'Earnings', 'Basic Salary', 750.00, 9000.00, ''),
(102, 10, 'Earnings', 'HRA', 15.00, 180.00, ''),
(103, 10, 'Earnings', 'Special Allowance', 24040.00, 288480.00, ''),
(104, 10, 'Deductions', 'Professional Tax', 200.00, 2400.00, ''),
(105, 10, 'Deductions', 'PF Contribution By Employee', 90.00, 1080.00, ''),
(106, 10, 'CTC Calculations', 'PF Contribution By Employer', 97.00, 1164.00, ''),
(107, 10, 'CTC Calculations', 'Bonus', 62.00, 744.00, ''),
(108, 10, 'CTC Calculations', 'Gratuity', 36.00, 432.00, ''),
(109, 11, 'Earnings', 'Basic Salary', 750.00, 9000.00, ''),
(110, 11, 'Earnings', 'HRA', 15.00, 180.00, ''),
(111, 11, 'Earnings', 'Special Allowance', 23233.84, 278806.08, ''),
(112, 11, 'Deductions', 'Professional Tax', 200.00, 2400.00, ''),
(113, 11, 'Deductions', 'PF Contribution By Employee', 90.00, 1080.00, ''),
(114, 11, 'CTC Calculations', 'PF Contribution By Employer', 97.00, 1164.00, ''),
(115, 11, 'CTC Calculations', 'ESI Contribution By Employer', 806.16, 806.16, ''),
(116, 11, 'CTC Calculations', 'Bonus', 62.00, 744.00, ''),
(117, 11, 'CTC Calculations', 'Gratuity', 36.00, 432.00, ''),
(118, 12, 'Earnings', 'Basic Salary', 800.00, 9600.00, ''),
(119, 12, 'Earnings', 'HRA', 24.00, 288.00, ''),
(120, 12, 'Earnings', 'Special Allowance', 18345.67, 220148.04, ''),
(121, 12, 'Deductions', 'Professional Tax', 200.00, 2400.00, ''),
(122, 12, 'Deductions', 'PF Contribution By Employee', 96.00, 1152.00, ''),
(123, 12, 'Deductions', 'ESI Contribution By Employee', 6.00, 72.00, ''),
(124, 12, 'CTC Calculations', 'PF Contribution By Employer', 104.00, 1248.00, ''),
(125, 12, 'CTC Calculations', 'ESI Contribution By Employer', 622.33, 622.33, ''),
(126, 12, 'CTC Calculations', 'Bonus', 66.00, 792.00, ''),
(127, 12, 'CTC Calculations', 'Gratuity', 38.00, 456.00, ''),
(128, 13, 'Earnings', 'Basic Salary', 800.00, 9600.00, ''),
(129, 13, 'Earnings', 'HRA', 24.00, 288.00, ''),
(130, 13, 'Earnings', 'Special Allowance', 18345.67, 220148.04, ''),
(131, 13, 'Deductions', 'Professional Tax', 200.00, 2400.00, ''),
(132, 13, 'Deductions', 'PF Contribution By Employee', 96.00, 1152.00, ''),
(133, 13, 'Deductions', 'ESI Contribution By Employee', 6.00, 72.00, ''),
(134, 13, 'CTC Calculations', 'PF Contribution By Employer', 104.00, 1248.00, ''),
(135, 13, 'CTC Calculations', 'ESI Contribution By Employer', 622.33, 622.33, ''),
(136, 13, 'CTC Calculations', 'Bonus', 66.00, 792.00, ''),
(137, 13, 'CTC Calculations', 'Gratuity', 38.00, 456.00, '');

-- --------------------------------------------------------

--
-- Table structure for table `salary_head`
--

CREATE TABLE `salary_head` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `entry_by` varchar(50) NOT NULL,
  `entry_date` date NOT NULL,
  `emp_type` varchar(50) NOT NULL,
  `salary_type` varchar(25) NOT NULL,
  `salary_calculate_on` varchar(25) NOT NULL,
  `pf_applicable` varchar(3) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `salary_head`
--

INSERT INTO `salary_head` (`id`, `plant_id`, `entry_by`, `entry_date`, `emp_type`, `salary_type`, `salary_calculate_on`, `pf_applicable`) VALUES
(5, 60, 'master', '2023-08-03', 'Officer', '', '', 'YES'),
(6, 60, 'master', '2023-08-03', 'Manager', '', '', 'YES');

-- --------------------------------------------------------

--
-- Table structure for table `salary_head_details`
--

CREATE TABLE `salary_head_details` (
  `id` int NOT NULL,
  `salary_hdr_id` int NOT NULL,
  `salary_head_group` varchar(15) NOT NULL,
  `calc_type` varchar(25) NOT NULL,
  `salary_head` varchar(150) NOT NULL,
  `percent` decimal(5,2) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `type_flag` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `salary_head_details`
--

INSERT INTO `salary_head_details` (`id`, `salary_hdr_id`, `salary_head_group`, `calc_type`, `salary_head`, `percent`, `amount`, `type_flag`) VALUES
(47, 5, 'Earnings', 'Percentage', 'Basic Salary', 3.00, 3.00, 'BASIC'),
(48, 5, 'Earnings', 'Percentage', 'HRA', 2.00, 2.00, 'HRA'),
(49, 5, 'Deductions', 'Amount', 'Professional Tax', 0.00, 200.00, 'PT'),
(50, 5, 'Deductions', 'Percentage', 'PF Contribution By Employee', 12.00, 0.00, 'PF'),
(51, 5, 'Deductions', 'Percentage', 'ESI Contribution By Employee', 0.75, 0.00, 'ESIC'),
(52, 5, 'CTC Calculation', 'Percentage', 'PF Contribution By Employer', 13.00, 0.00, 'PF'),
(53, 5, 'CTC Calculation', 'Percentage', 'ESI Contribution By Employer', 3.25, 0.00, 'ESIC'),
(54, 5, 'CTC Calculation', 'Percentage', 'Bonus', 8.33, 0.00, 'BONUS'),
(55, 5, 'CTC Calculation', 'Percentage', 'Gratuity', 4.81, 0.00, 'GRATUITY'),
(56, 6, 'Earnings', 'Percentage', 'Basic Salary', 4.00, 4.00, 'BASIC'),
(57, 6, 'Earnings', 'Percentage', 'HRA', 3.00, 3.00, 'HRA'),
(58, 6, 'Deductions', 'Amount', 'Professional Tax', 0.00, 200.00, 'PT'),
(59, 6, 'Deductions', 'Percentage', 'PF Contribution By Employee', 12.00, 0.00, 'PF'),
(60, 6, 'Deductions', 'Percentage', 'ESI Contribution By Employee', 0.75, 0.00, 'ESIC'),
(61, 6, 'CTC Calculation', 'Percentage', 'PF Contribution By Employer', 13.00, 0.00, 'PF'),
(62, 6, 'CTC Calculation', 'Percentage', 'ESI Contribution By Employer', 3.25, 0.00, 'ESIC'),
(63, 6, 'CTC Calculation', 'Percentage', 'Bonus', 8.33, 0.00, 'BONUS'),
(64, 6, 'CTC Calculation', 'Percentage', 'Gratuity', 4.81, 0.00, 'GRATUITY');

-- --------------------------------------------------------

--
-- Table structure for table `salary_types`
--

CREATE TABLE `salary_types` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `payroll_type` varchar(25) NOT NULL,
  `entry_by` varchar(15) NOT NULL,
  `entry_date` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `salary_types`
--

INSERT INTO `salary_types` (`id`, `plant_id`, `payroll_type`, `entry_by`, `entry_date`) VALUES
(26, 60, 'Manager', 'master', '2023-08-03 01:30:47'),
(27, 60, 'Officer', 'master', '2023-08-03 01:31:03');

-- --------------------------------------------------------

--
-- Table structure for table `sales`
--

CREATE TABLE `sales` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `order_type` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gst_app` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gst_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `bill_curr` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `order_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `plant_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `branch` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `po_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `curr_rate` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `client_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `disc_percent` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `val_in_inr` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pay_mode` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `po_date` datetime NOT NULL,
  `gross_total` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `disc_total` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tax_total` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `net_total` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `final_total` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sales_data` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `taxable` decimal(10,2) NOT NULL,
  `CgstVal` decimal(10,2) NOT NULL,
  `SgstVal` decimal(10,2) NOT NULL,
  `IgstVal` decimal(10,2) NOT NULL,
  `OthChrg` decimal(10,2) NOT NULL,
  `RndOffAmt` decimal(10,2) NOT NULL,
  `TotInvVal` decimal(10,2) NOT NULL,
  `approve_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime NOT NULL,
  `invoice` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `order_qty` int NOT NULL,
  `other` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `sales`
--
DELIMITER $$
CREATE TRIGGER `sales_order_no_insert` BEFORE INSERT ON `sales` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM sales ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.order_no = concat('SO', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `salesmrp`
--

CREATE TABLE `salesmrp` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `category` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `client_code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mrp` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `approve_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sales_product`
--

CREATE TABLE `sales_product` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `order_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_date` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `f_qty` decimal(10,2) NOT NULL,
  `sale_rate` decimal(10,2) NOT NULL,
  `mrp` decimal(10,2) NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `disc_per` decimal(10,2) NOT NULL,
  `gst_per` decimal(10,2) NOT NULL,
  `gross_total` decimal(10,2) NOT NULL,
  `disc_total` decimal(10,2) NOT NULL,
  `tax_total` decimal(10,2) NOT NULL,
  `net_total` decimal(10,2) NOT NULL,
  `taxable` decimal(10,2) NOT NULL,
  `SgstAmt` decimal(10,2) NOT NULL,
  `CgstAmt` decimal(10,2) NOT NULL,
  `IgstAmt` decimal(10,2) NOT NULL,
  `OthChrg` decimal(10,2) NOT NULL,
  `free_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rate` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `disc_percent` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gst` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `other` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `order_qty` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sales_product_dtl`
--

CREATE TABLE `sales_product_dtl` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `order_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_date` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `f_qty` decimal(10,2) NOT NULL,
  `sale_rate` decimal(10,2) NOT NULL,
  `mrp` decimal(10,2) NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `disc_per` decimal(10,2) NOT NULL,
  `gst_per` decimal(10,2) NOT NULL,
  `gross_total` decimal(10,2) NOT NULL,
  `disc_total` decimal(10,2) NOT NULL,
  `tax_total` decimal(10,2) NOT NULL,
  `net_total` decimal(10,2) NOT NULL,
  `taxable` decimal(10,2) NOT NULL,
  `SgstAmt` decimal(10,2) NOT NULL,
  `CgstAmt` decimal(10,2) NOT NULL,
  `IgstAmt` decimal(10,2) NOT NULL,
  `OthChrg` decimal(10,2) NOT NULL,
  `free_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rate` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `disc_percent` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gst` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `other` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `order_qty` int NOT NULL,
  `dosage_type` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dosage_form` varchar(99) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_name` varchar(99) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `hsn` varchar(99) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `requiredQty` varchar(99) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `packing_style` varchar(9) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `singleProduct` varchar(9999) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sample_request`
--

CREATE TABLE `sample_request` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `name_client` varchar(50) NOT NULL,
  `address` varchar(50) NOT NULL,
  `temp_name` varchar(50) NOT NULL,
  `temp_address` varchar(50) NOT NULL,
  `temp_country` varchar(50) NOT NULL,
  `temp_no` varchar(50) NOT NULL,
  `temp_email` varchar(50) NOT NULL,
  `coa` varchar(50) NOT NULL,
  `fssai` varchar(50) NOT NULL,
  `requirement` varchar(50) NOT NULL,
  `type` varchar(50) NOT NULL,
  `avd_country` varchar(50) NOT NULL,
  `vendor_coa` varchar(50) NOT NULL,
  `stp` varchar(50) NOT NULL,
  `grade` varchar(50) NOT NULL,
  `testing` varchar(50) NOT NULL,
  `unit` varchar(50) NOT NULL,
  `solvent_system` varchar(50) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
  `color` varchar(50) NOT NULL,
  `core_tablet` varchar(50) NOT NULL,
  `enter` varchar(50) NOT NULL,
  `enter_stp` varchar(50) NOT NULL,
  `equip_avail` varchar(50) NOT NULL,
  `expected` varchar(50) NOT NULL,
  `requried` varchar(50) NOT NULL,
  `recommeded` varchar(50) NOT NULL,
  `status` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `sample_withdrawal`
--

CREATE TABLE `sample_withdrawal` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `cs_id` int NOT NULL,
  `sw_id` int NOT NULL,
  `product_name` varchar(100) NOT NULL,
  `batch_no` int NOT NULL,
  `date` date NOT NULL,
  `department_name` varchar(100) NOT NULL,
  `request_by_employee` varchar(100) NOT NULL,
  `reason_for_request` varchar(100) NOT NULL,
  `required_qty` varchar(50) NOT NULL,
  `required_pack` varchar(50) NOT NULL,
  `balance` varchar(100) NOT NULL,
  `checked_by` varchar(100) NOT NULL,
  `department` varchar(100) NOT NULL,
  `sw_id1` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `sampling`
--

CREATE TABLE `sampling` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `material_code` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `specification_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `containers` decimal(10,2) NOT NULL,
  `grn_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grn_date` date NOT NULL,
  `mfg_date` date NOT NULL,
  `exp_date` date NOT NULL,
  `urgency` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `change_unit` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `change_grade` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `change_qty` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_person` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `allocation_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `micro_person` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `alternate_qc_person` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `alternate_micro_person` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `request_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `request_date` datetime NOT NULL,
  `area_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `area_details` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `laf_start` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pressure_difference` int NOT NULL,
  `clearance_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `clearance_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `sampling_details` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `testing_status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `check_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime DEFAULT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `approve_date` datetime DEFAULT NULL,
  `batches` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `supplier_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inward_no` int NOT NULL,
  `manufacturer_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `received_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `received_unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grn_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `undertest_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `laf_stop` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ar_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checklist` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `balance_qeuipment_code` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `laf_qeuipment_code` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_start_time` datetime NOT NULL,
  `sampling_end_time` datetime NOT NULL,
  `batch_size` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `label` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_qty` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `samplerId` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `remark1` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `retest_status` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `sampling`
--

INSERT INTO `sampling` (`id`, `plant_id`, `sampling_no`, `user_no`, `material_code`, `batch_no`, `specification_no`, `containers`, `grn_no`, `grn_date`, `mfg_date`, `exp_date`, `urgency`, `change_unit`, `change_grade`, `change_qty`, `sampling_person`, `allocation_date`, `micro_person`, `alternate_qc_person`, `alternate_micro_person`, `request_by`, `request_date`, `area_status`, `area_details`, `laf_start`, `pressure_difference`, `clearance_status`, `clearance_no`, `sample_status`, `sampling_details`, `status`, `testing_status`, `entry_by`, `entry_date`, `check_by`, `check_date`, `approve_by`, `approve_date`, `batches`, `supplier_no`, `inward_no`, `manufacturer_no`, `received_qty`, `received_unit`, `grn_by`, `undertest_qty`, `laf_stop`, `ar_no`, `checklist`, `balance_qeuipment_code`, `laf_qeuipment_code`, `sampling_start_time`, `sampling_end_time`, `batch_size`, `label`, `sample_qty`, `samplerId`, `remark1`, `retest_status`) VALUES
(259, '60', 'S0001', 'gmpdemo1', 'RM00012', '1', '', 2.00, 'GRN/22/R/0522', '2023-08-02', '2023-07-05', '2024-06-04', '', '', '', '', 'EC04', '2023-08-02', 'EC04', 'EC04', 'EC04', '', '0000-00-00 00:00:00', 'complete', '{\"equipment_code\":\"54\",\"cleaning_status\":\"Satisfactory\",\"temp\":\"28\",\"humidity\":\"26\"}', '', 0, 'pending', '', 'complete', '{\"identication_qty\":\"\",\"composite_qty\":0,\"reserve_composite\":0,\"additional_qty\":0,\"actual_indentification\":0,\"actual_composite\":0,\"withdrawal_identication\":\"\",\"withdrawal_composite\":0,\"sample_qty\":\"4\",\"reserve_qty\":0,\"sample_unit\":\"gm\",\"start_time\":\"2023-08-03T09:31:39.352Z\",\"stop_date\":\"2023-08-03T09:48:24.047Z\",\"laf_start_date\":null,\"laf_stop_date\":\"2023-08-03T09:48:28.639Z\",\"lafOtion\":1,\"samplerId\":\"12\",\"container_no\":2,\"Remark\":\"ok\",\"undertest_qty\":0,\"container_details\":[{\"container_no\":1,\"sample_qty\":0,\"reserve_qty\":0,\"total_qty\":\"0.00\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":2,\"sample_qty\":0,\"reserve_qty\":0,\"total_qty\":\"0.00\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"}],\"checklist\":[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}],\"equipment_code\":\"\",\"checkPointData\":[],\"balance_eqip_code\":0,\"laf_eqip_code\":0}', 'approve', 'active', 'master', '2023-08-03', 'master', '2023-08-03 03:21:43', 'master', '2023-08-03 03:21:59', '\"\"', 'V10001', 0, '', '', '', '', '0', '', 'AR-01', '[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}]', '0', '', '2023-08-03 09:31:39', '2023-08-03 09:48:24', '', '', '0', '12', '', 'Pending'),
(260, '60', 'S0260', 'gmpdemo1', 'RM00013', '1', '', 3.00, 'GRN/22/R/0523', '2023-08-03', '2023-06-21', '2024-10-16', '', '', '', '', 'EC07', '2023-08-03', 'EC07', 'EC07', 'EC07', '', '0000-00-00 00:00:00', 'complete', '{\"equipment_code\":\"54\",\"cleaning_status\":\"Satisfactory\",\"temp\":\"28\",\"humidity\":\"26\"}', '', 0, 'pending', '', 'complete', '{\"identication_qty\":\"10\",\"composite_qty\":0,\"reserve_composite\":0,\"additional_qty\":0,\"actual_indentification\":30,\"actual_composite\":10,\"withdrawal_identication\":\"10\",\"withdrawal_composite\":3.3300000000000000710542735760100185871124267578125,\"reserve_qty\":0,\"start_time\":\"2023-08-03T11:56:56.195Z\",\"stop_date\":\"2023-08-03T11:59:18.307Z\",\"laf_start_date\":null,\"laf_stop_date\":\"2023-08-03T11:59:21.219Z\",\"container_no\":3,\"Remark\":\"ok\",\"lafOtion\":1,\"samplerId\":\"12\",\"undertest_qty\":12.330000000000001847411112976260483264923095703125,\"container_details\":[{\"container_no\":1,\"sample_qty\":3,\"reserve_qty\":1.1100000000000000976996261670137755572795867919921875,\"total_qty\":\"4.11\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":2,\"sample_qty\":3,\"reserve_qty\":1.1100000000000000976996261670137755572795867919921875,\"total_qty\":\"4.11\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":3,\"sample_qty\":3,\"reserve_qty\":1.1100000000000000976996261670137755572795867919921875,\"total_qty\":\"4.11\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"}],\"checklist\":[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}],\"equipment_code\":\"\",\"checkPointData\":[],\"balance_eqip_code\":0,\"laf_eqip_code\":0}', 'approve', 'active', 'master', '2023-08-03', 'master', '2023-08-03 05:31:02', 'master', '2023-08-03 05:33:08', '\"\"', 'V10646', 0, '', '', '', '', '12.33', '', 'AR-02', '[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}]', '0', '', '2023-08-03 11:56:56', '2023-08-03 11:59:18', '', '', '12.33', '12', '', 'Pending'),
(261, '60', 'S0261', 'gmpdemo1', 'RM00014', 'B031', '', 2.00, 'GRN/22/R/0524', '2023-08-07', '2023-08-07', '2023-08-31', '', '', '', '', 'EC07', '2023-08-07', 'EC07', 'EC07', 'EC07', '', '0000-00-00 00:00:00', 'complete', '{\"equipment_code\":\"54\",\"cleaning_status\":\"Satisfactory\",\"temp\":\"30\",\"humidity\":\"50\"}', '', 0, 'pending', '', 'complete', '{\"identication_qty\":\"0\",\"composite_qty\":0,\"reserve_composite\":0,\"additional_qty\":0,\"actual_indentification\":0,\"actual_composite\":0,\"withdrawal_identication\":\"0\",\"withdrawal_composite\":0,\"reserve_qty\":0,\"sample_unit\":\"Kg\",\"start_time\":\"2023-08-07T12:34:51.313Z\",\"stop_date\":\"2023-08-07T12:35:38.002Z\",\"laf_start_date\":null,\"laf_stop_date\":\"2023-08-07T12:35:41.249Z\",\"lafOtion\":1,\"samplerId\":\"12\",\"container_no\":2,\"Remark\":\"ok\",\"undertest_qty\":0,\"container_details\":[{\"container_no\":1,\"sample_qty\":0,\"reserve_qty\":0,\"total_qty\":\"0.00\",\"unit\":\"gm\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":2,\"sample_qty\":0,\"reserve_qty\":0,\"total_qty\":\"0.00\",\"unit\":\"gm\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"}],\"checklist\":[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}],\"equipment_code\":\"\",\"checkPointData\":[],\"balance_eqip_code\":0,\"laf_eqip_code\":0}', 'approve', 'active', 'master', '2023-08-07', 'master', '2023-08-07 06:05:55', 'master', '2023-08-07 06:06:07', '\"\"', 'V10647', 0, '', '', '', '', '0', '', 'AR-03', '[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}]', '0', '', '2023-08-07 12:34:51', '2023-08-07 12:35:38', '', '', '0', '12', 'ok', 'Pending'),
(262, '60', 'S0262', 'gmpdemo1', 'RM00015', 'B087', '', 16.00, 'GRN/22/R/0526', '2023-08-08', '2023-08-08', '2023-08-31', '', '', '', '', 'EC07', '2023-08-08', 'EC07', 'EC07', 'EC07', '', '0000-00-00 00:00:00', 'complete', '{\"equipment_code\":\"54\",\"cleaning_status\":\"Satisfactory\",\"temp\":\"30\",\"humidity\":\"50\"}', '', 0, 'pending', '', 'complete', '{\"identication_qty\":\"0\",\"composite_qty\":60,\"reserve_composite\":160,\"additional_qty\":20,\"actual_indentification\":0,\"actual_composite\":180,\"withdrawal_identication\":\"0\",\"withdrawal_composite\":3.910000000000000142108547152020037174224853515625,\"sample_qty\":\"10\",\"reserve_qty\":60,\"sample_unit\":\"gm\",\"start_time\":\"2023-08-08T10:32:09.330Z\",\"stop_date\":\"2023-08-08T10:38:27.126Z\",\"laf_start_date\":null,\"laf_stop_date\":\"2023-08-08T10:38:25.959Z\",\"lafOtion\":1,\"samplerId\":\"12\",\"container_no\":46,\"Remark\":\"ok\",\"undertest_qty\":3.909999999999998809840917601832188665866851806640625,\"container_details\":[{\"container_no\":1,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":2,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":3,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":4,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":5,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":6,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":7,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":8,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":9,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":10,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":11,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":12,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":13,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":14,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":15,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":16,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":17,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":18,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":19,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":20,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":21,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":22,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":23,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":24,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":25,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":26,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":27,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":28,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":29,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":30,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":31,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":32,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":33,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":34,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":35,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":36,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":37,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":38,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":39,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":40,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":41,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":42,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":43,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":44,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":45,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":46,\"sample_qty\":0,\"reserve_qty\":0.08500000000000000610622663543836097232997417449951171875,\"total_qty\":\"0.09\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"}],\"checklist\":[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}],\"equipment_code\":\"\",\"checkPointData\":[],\"balance_eqip_code\":0,\"laf_eqip_code\":0}', 'approve', 'active', 'master', '2023-08-08', 'master', '2023-08-08 04:08:46', 'master', '2023-08-08 04:08:59', '\"\"', 'V10648', 0, '', '', '', '', '3.91', '', 'AR-04', '[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}]', '0', '', '2023-08-08 10:32:09', '2023-08-08 10:38:27', '', '', '3.91', '12', 'ok', 'Pending'),
(263, '60', 'S0263', 'gmpdemo1', 'RM000653', 'B077', '', 3.00, 'GRN/22/R/0527', '2023-08-31', '2023-08-31', '2023-09-30', '', '', '', '', 'EC002', '2023-08-31', 'EC002', 'EC002', 'EC002', '', '0000-00-00 00:00:00', 'complete', '{\"equipment_code\":\"54\",\"cleaning_status\":\"Satisfactory\",\"temp\":\"40\",\"humidity\":\"60\"}', '', 0, 'pending', '', 'complete', '{\"identication_qty\":\"50\",\"composite_qty\":80,\"reserve_composite\":200,\"additional_qty\":20,\"actual_indentification\":0,\"actual_composite\":220,\"withdrawal_identication\":\"50\",\"withdrawal_composite\":73.3299999999999982946974341757595539093017578125,\"reserve_qty\":80,\"start_time\":\"2023-08-31T09:12:56.019Z\",\"stop_date\":\"2023-08-31T09:13:21.547Z\",\"laf_start_date\":null,\"laf_stop_date\":\"2023-08-31T09:13:23.434Z\",\"container_no\":3,\"Remark\":\"ok\",\"lafOtion\":1,\"samplerId\":\"12\",\"undertest_qty\":73.3299999999999982946974341757595539093017578125,\"container_details\":[{\"container_no\":1,\"sample_qty\":0,\"reserve_qty\":24.443333333333331580661251791752874851226806640625,\"total_qty\":\"24.44\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":2,\"sample_qty\":0,\"reserve_qty\":24.443333333333331580661251791752874851226806640625,\"total_qty\":\"24.44\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"},{\"container_no\":3,\"sample_qty\":0,\"reserve_qty\":24.443333333333331580661251791752874851226806640625,\"total_qty\":\"24.44\",\"unit\":\"\",\"status\":\"done\",\"remarks\":\"\",\"remark\":\"ok\"}],\"checklist\":[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}],\"equipment_code\":\"\",\"checkPointData\":[],\"balance_eqip_code\":0,\"laf_eqip_code\":0}', 'approve', 'active', 'master', '2023-08-31', 'master', '2023-08-31 02:43:42', 'master', '2023-08-31 02:43:53', '\"\"', 'V10651', 0, '', '', '', '', '73.33', '', 'AR-05', '[{\"observation\":\"All are the containers properly segregated?\",\"check\":\"\"},{\"observation\":\"All are the containers properly Labeled (Supplier/Mfg., Approved label, Quarantine Label?\",\"check\":\"\"},{\"observation\":\"Is the information given on Quarantine label as per GRN?\",\"check\":\"\"},{\"observation\":\"Are there any damage/leakage/outer seals intact of the Drums/Containers/Bags?\",\"check\":\"\"},{\"observation\":\"Is sampling area properly cleaned\",\"check\":\"\"},{\"observation\":\"Is there any extraneous material observed on surface of Polybags\",\"check\":\"\"},{\"observation\":\"Are all the Drums/Containers sampled one by one and ls are closed properly after sampling?\",\"check\":\"\"},{\"observation\":\"Whether u201cSampledu201d labels with Container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether u201cSample for Analysisu201d labels with container No. are affix on polybags/Bottles containing sample?\",\"check\":\"\"},{\"observation\":\"Whether the used sampling tools are kept in Polybags and closed properly for transferring it to laboratory for cleaning?\",\"check\":\"\"},{\"observation\":\"Are all the safety precautions have been taken during Sampling?\",\"check\":\"\"},{\"observation\":\"Are all the containers taken for sampling kept back to designated places?\",\"check\":\"\"},{\"observation\":\"Whether tanker number mentioned in tanker receipt intimation is matched with tanker to be sampled?\",\"check\":\"\"},{\"observation\":\"Are the entire compartment sealed of tanker?\",\"check\":\"\"},{\"observation\":\"Is the tanker cleaning record available with tanker?\",\"check\":\"\"}]', '0', '', '2023-08-31 09:12:56', '2023-08-31 09:13:22', '', '', '73.33', '12', 'ok', 'approve');

--
-- Triggers `sampling`
--
DELIMITER $$
CREATE TRIGGER `sampling_no_insert` BEFORE INSERT ON `sampling` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM sampling ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.sampling_no = concat('S', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `samplingfg`
--

CREATE TABLE `samplingfg` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `document_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL COMMENT 'MFR NO',
  `document_type` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_size` decimal(10,2) NOT NULL,
  `batch_qty` decimal(10,2) NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfg_date` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_date` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_date1` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `retest_date` date NOT NULL,
  `prepared_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `prepared_date` datetime NOT NULL,
  `checked_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checked_date` datetime DEFAULT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `intimation_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `received_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `received_date` datetime DEFAULT NULL,
  `sample_unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `chemical_analysis` decimal(10,2) NOT NULL,
  `microbiology_analysis` decimal(10,2) NOT NULL,
  `reserve_analysis` decimal(10,2) NOT NULL,
  `additional_sample` decimal(10,2) NOT NULL,
  `total_qty` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `withdrawal_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `withdrawal_date` datetime DEFAULT NULL,
  `testing_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `ar_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qc_received_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qc_received_date` date DEFAULT NULL,
  `tests` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_date` datetime DEFAULT NULL,
  `testing_check_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_check_date` datetime DEFAULT NULL,
  `release_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `checkpoints` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `release_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `release_date` datetime DEFAULT NULL,
  `coa_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `coa_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `coa_date` date NOT NULL,
  `transfer` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `transfer_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `transfer_date` datetime DEFAULT NULL,
  `gross_total` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tare_total` int NOT NULL,
  `net_total` int NOT NULL,
  `containers` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `test_allocate_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `test_allocate_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_person` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `allocation_status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `is_RDS` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `specification_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `alalysis_start_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `alalysis_start_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `alalysis_end_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `alalysis_end_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `samplingfg`
--
DELIMITER $$
CREATE TRIGGER `samplingfg_no_insert` BEFORE INSERT ON `samplingfg` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM samplingfg ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.sampling_no = concat('SF', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `sampling_batches`
--

CREATE TABLE `sampling_batches` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ar_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grn_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampled_container` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_condition` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_qty` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampler_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `seal_check` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `stop_batch` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfg_date` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_date` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfg_by` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pack_size` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `total_containers` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qty_received` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `container_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gross_wt` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tare_wt` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` int NOT NULL,
  `weight` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `challan_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `root_container` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `correction` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `sampling_batches`
--

INSERT INTO `sampling_batches` (`id`, `plant_id`, `material_code`, `batch_no`, `ar_no`, `grn_no`, `sampled_container`, `material_condition`, `sample_qty`, `sampler_id`, `seal_check`, `status`, `stop_batch`, `mfg_date`, `exp_date`, `mfg_by`, `pack_size`, `total_containers`, `qty_received`, `container_no`, `gross_wt`, `tare_wt`, `remark`, `weight`, `challan_no`, `root_container`, `unit`, `correction`) VALUES
(4274, '', '', '1', 'AR-01', 'GRN/22/R/0523', '', '', '', '', '', 'approve', '', '2023-07-05', '2024-06-04', 'V10001', '50', '2', '100', '', '', '', 0, '[{\"container_no\":\"1\",\"lbgross_weight\":650,\"lbtare_weight\":150,\"lbnet_weight\":500,\"acgross_weight\":650,\"action\":\"Accept\"}]', 'C763', '1', 'Kg', ''),
(4275, '', '', '1', 'AR-02', 'GRN/22/R/0523', '', '', '', '', '', 'approve', '', '2023-06-21', '2024-10-16', '', '100', '3', '300', '', '', '', 0, '[{\"container_no\":\"1\",\"lbgross_weight\":650,\"lbtare_weight\":150,\"lbnet_weight\":500,\"acgross_weight\":650,\"action\":\"Accept\"}]', 'C02', '1', 'Kg', ''),
(4276, '', '', 'B031', 'AR-03', 'GRN/22/R/0524', '', '', '', '', '', 'approve', '', '2023-08-07', '2023-08-31', 'V10647', '100', '2', '200', '', '', '', 0, '[{\"container_no\":\"213\",\"lbgross_weight\":300,\"lbtare_weight\":100,\"lbnet_weight\":200,\"acgross_weight\":500,\"action\":\"Accept\"}]', 'C098', '1', 'Kg', ''),
(4277, '', '', 'B012', '', '', '', '', '', '', '', 'pending', '', '2023-08-08', '2023-08-31', 'V10648', '5', '40', '200', '', '', '', 0, '', 'C086', '', 'Kg', ''),
(4278, '', '', 'B087', 'AR-04', 'GRN/22/R/0526', '', '', '', '', '', 'approve', '', '2023-08-08', '2023-08-31', 'V10648', '6', '16', '100', '', '', '', 0, '[{\"container_no\":\"55\",\"lbgross_weight\":500,\"lbtare_weight\":100,\"lbnet_weight\":400,\"acgross_weight\":600,\"action\":\"Accept\"},{\"container_no\":\"332\",\"lbgross_weight\":600,\"lbtare_weight\":200,\"lbnet_weight\":400,\"acgross_weight\":700,\"action\":\"Accept\"}]', 'C084', '2', 'Kg', ''),
(4279, '', '', 'B077', 'AR-05', 'GRN/22/R/0527', '', '', '', '', '', 'approve', '', '2023-08-31', '2023-09-30', 'V10651', '100', '3', '300', '', '', '', 0, '[{\"container_no\":\"1\",\"lbgross_weight\":500,\"lbtare_weight\":200,\"lbnet_weight\":300,\"acgross_weight\":600,\"action\":\"Accept\"}]', 'C0654', '1', 'Kg', '');

-- --------------------------------------------------------

--
-- Table structure for table `score`
--

CREATE TABLE `score` (
  `playerid` int UNSIGNED NOT NULL,
  `score` int DEFAULT '0',
  `name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `section`
--

CREATE TABLE `section` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `section_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `section_code` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `building_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `room_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checkpoints_status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `checkpoints` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `temp_status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `min_temp` decimal(10,2) NOT NULL,
  `max_temp` decimal(10,2) NOT NULL,
  `min_humidity` decimal(10,2) NOT NULL,
  `max_humidity` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `section`
--

INSERT INTO `section` (`id`, `plant_id`, `user_no`, `section_name`, `department`, `section_code`, `building_no`, `room_no`, `status`, `entry_by`, `entry_date`, `approve_by`, `approve_date`, `checkpoints_status`, `checkpoints`, `temp_status`, `min_temp`, `max_temp`, `min_humidity`, `max_humidity`) VALUES
(26, '', 'gmpdemo1', 'IPQC room', 'IPQC ', 'room no.01', '', '', 'pending', 'master', '2023-05-20 03:12:34', '', '', 'pending', '', 'pending', 0.00, 0.00, 0.00, 0.00);

-- --------------------------------------------------------

--
-- Table structure for table `security_round`
--

CREATE TABLE `security_round` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `security_person` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `from_time` varchar(33) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `to_time` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `observation` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `abnormalities` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `report_to` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `send_checklist`
--

CREATE TABLE `send_checklist` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vendor_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checklist_No` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checklist_type` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `effective_date` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `checklist_status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `service`
--

CREATE TABLE `service` (
  `id` int NOT NULL,
  `user_no` varchar(20) NOT NULL,
  `plant_id` varchar(20) NOT NULL,
  `department` varchar(30) NOT NULL,
  `service_code` varchar(20) NOT NULL,
  `service_type` varchar(30) NOT NULL,
  `service_desp` varchar(20) NOT NULL,
  `gst_per` decimal(5,2) NOT NULL,
  `sac_code` varchar(8) NOT NULL,
  `service_title` varchar(20) NOT NULL,
  `entry_date` varchar(30) NOT NULL,
  `entry_by` varchar(30) NOT NULL,
  `status` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `shelf`
--

CREATE TABLE `shelf` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `shelf` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'approve'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `shelf`
--

INSERT INTO `shelf` (`id`, `plant_id`, `shelf`, `status`) VALUES
(9, '', '12 Months', 'approve');

-- --------------------------------------------------------

--
-- Table structure for table `shelf_life`
--

CREATE TABLE `shelf_life` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `shelf_life` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `shift`
--

CREATE TABLE `shift` (
  `id` int NOT NULL,
  `shift_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `night_shift` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `start_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `end_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `duration` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `date_change` date NOT NULL,
  `half_day` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `full_day` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `default_shift` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `emp_id` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `from_date` date NOT NULL,
  `to_date` date NOT NULL,
  `shift` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'active'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `shift_allocation`
--

CREATE TABLE `shift_allocation` (
  `id` int NOT NULL,
  `plant_id` varchar(50) NOT NULL,
  `Empolyee_Id` varchar(50) NOT NULL,
  `Shift` varchar(50) NOT NULL,
  `Start_date` varchar(50) NOT NULL,
  `End_date` varchar(50) NOT NULL,
  `Is_change_request` varchar(50) NOT NULL,
  `shift_Id` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `shift_schedule`
--

CREATE TABLE `shift_schedule` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `shift_name` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `default_shift` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `full_day` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `date_change` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `duration` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `night_shift` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `start_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `end_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `lunch_start_time` time NOT NULL,
  `lunch_end_time` time NOT NULL,
  `short_leave` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `short_leave_hrs` int NOT NULL,
  `half_day_hrs` int NOT NULL,
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'active'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `shortages`
--

CREATE TABLE `shortages` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `dosage_form` varchar(20) NOT NULL,
  `product_name` varchar(20) NOT NULL,
  `grade` varchar(20) NOT NULL,
  `mfr_no` varchar(20) NOT NULL,
  `mfr_desc` varchar(500) NOT NULL,
  `bfr_no` varchar(20) NOT NULL,
  `pack_size` varchar(20) NOT NULL,
  `bfr_batch_size` varchar(20) NOT NULL,
  `number_of_batches` varchar(20) NOT NULL,
  `material` varchar(10000) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `software_customization`
--

CREATE TABLE `software_customization` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `department` varchar(50) NOT NULL,
  `module` varchar(50) NOT NULL,
  `param_label` varchar(50) NOT NULL,
  `param_value` varchar(50) NOT NULL,
  `entry_by` varchar(15) NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `software_restriction`
--

CREATE TABLE `software_restriction` (
  `id` int NOT NULL,
  `plant_id` varchar(20) NOT NULL,
  `software_type` varchar(20) NOT NULL,
  `software_master` varchar(20) NOT NULL,
  `approved_by` varchar(30) NOT NULL,
  `date_of_approved` date NOT NULL,
  `date_of_edited_by` date NOT NULL,
  `software_type_edit` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `solid_media`
--

CREATE TABLE `solid_media` (
  `id` int NOT NULL,
  `batch_no` int NOT NULL,
  `inc_date` date NOT NULL,
  `inc_id` int NOT NULL,
  `inc_temp` varchar(100) NOT NULL,
  `incubation_complete` varchar(100) NOT NULL,
  `lot_no` int NOT NULL,
  `media_code` int NOT NULL,
  `observations` varchar(100) NOT NULL,
  `prepared_date` date NOT NULL,
  `suspension_no` int NOT NULL,
  `satisfactory` varchar(100) NOT NULL,
  `entry_by` varchar(50) NOT NULL,
  `entry_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `sopinitiation`
--

CREATE TABLE `sopinitiation` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `department` varchar(300) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `title` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sop_for` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `other` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `check_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime NOT NULL,
  `check_remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `sopcreated` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `purpose` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `scope` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `role` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `definition` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reference` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `process` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `procedures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `abbreviation` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `training` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `distribution` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ctrl_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `revision` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sops`
--

CREATE TABLE `sops` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `department` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sop_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sop_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `version_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `revision_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `file_name` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'approve'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sop_details`
--

CREATE TABLE `sop_details` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `sop_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `file` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `title` varchar(400) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `detail` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sop_distribution`
--

CREATE TABLE `sop_distribution` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `sop_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `copy` int NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `received_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `received_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sop_gen`
--

CREATE TABLE `sop_gen` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `sop_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `version_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `file` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `title` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `form_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `copy_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `revision_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `effective_date` date NOT NULL,
  `next_review_date` datetime NOT NULL,
  `supersede_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `check_by` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime NOT NULL,
  `approve_by` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime NOT NULL,
  `status` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `i_no` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sop_generate`
--

CREATE TABLE `sop_generate` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `department` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `initiation_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sop_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `i_no` int NOT NULL,
  `version_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `title` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sop_for` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `purpose` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `scope` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `role` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `definition` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reference` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `process` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `procedures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `abbreviation` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `training` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `distribution` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `revision` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `check_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime DEFAULT NULL,
  `approve_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `training_status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `training_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `implementation_status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `effective_date` date NOT NULL,
  `distribution_status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sop_generate_drafts`
--

CREATE TABLE `sop_generate_drafts` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `department` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `initiation_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sop_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `i_no` int NOT NULL,
  `version_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `title` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sop_for` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `purpose` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `scope` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `role` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `definition` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reference` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `process` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `procedures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `abbreviation` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `training` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `distribution` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `revision` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `check_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime DEFAULT NULL,
  `approve_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `training_status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `training_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `implementation_status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `effective_date` date NOT NULL,
  `distribution_status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sop_revision`
--

CREATE TABLE `sop_revision` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `sop_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `request_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `request_date` datetime NOT NULL,
  `check_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime NOT NULL,
  `check_remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `change_status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `ctrl_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `title` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sop_for` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `effective_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `sop_training`
--

CREATE TABLE `sop_training` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `sop_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `revision_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `training_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `topic` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `training_period` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `intimation_dept` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `trainer` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `trainees` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `special_grade`
--

CREATE TABLE `special_grade` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `special_grade` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `specification`
--

CREATE TABLE `specification` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `specification_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `spec_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_subtype` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_grade` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `chemical_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `version_no` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `supersede_no` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_qty` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `micro_qty` decimal(10,2) NOT NULL,
  `indentification_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sap_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `storage` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `shelf_life` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `retest_period` int NOT NULL,
  `safety_precaution` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `stage` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reference` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `total_tests` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `check_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime DEFAULT NULL,
  `approve_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `approve_date` date DEFAULT NULL,
  `ismoa` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `moa_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `retest` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `review_date` date NOT NULL,
  `review_in_months` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stability` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `chemical_qty` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `physical_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `special_grade` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `control_sample` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `additional_sample` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_nature` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grade` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `water_type` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `totalsample_qty` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `molecular_formula` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `molecular_weight` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `effective_date` date NOT NULL,
  `cas_name` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `storage_condition` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_applicable` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `primary_reviewed_by` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `primary_review_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `primary_review_on` datetime NOT NULL,
  `secondary_reviewed_by` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `secondary_review_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `secondary_review_on` datetime NOT NULL,
  `qa_review_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `qa_review_on` datetime NOT NULL,
  `qa_reviewed_by` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `spec_status` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Active',
  `cc_no` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `specification`
--

INSERT INTO `specification` (`id`, `plant_id`, `user_no`, `specification_no`, `spec_type`, `material_subtype`, `material_code`, `material_grade`, `chemical_name`, `version_no`, `supersede_no`, `sample_qty`, `micro_qty`, `indentification_qty`, `unit`, `sap_no`, `storage`, `shelf_life`, `retest_period`, `safety_precaution`, `product_code`, `stage`, `reference`, `total_tests`, `status`, `entry_by`, `entry_date`, `check_by`, `check_date`, `approve_by`, `approve_date`, `ismoa`, `moa_no`, `retest`, `review_date`, `review_in_months`, `stability`, `chemical_qty`, `physical_qty`, `special_grade`, `control_sample`, `additional_sample`, `material_nature`, `grade`, `water_type`, `totalsample_qty`, `molecular_formula`, `molecular_weight`, `effective_date`, `cas_name`, `storage_condition`, `sample_applicable`, `primary_reviewed_by`, `primary_review_status`, `primary_review_on`, `secondary_reviewed_by`, `secondary_review_status`, `secondary_review_on`, `qa_review_status`, `qa_review_on`, `qa_reviewed_by`, `spec_status`, `cc_no`) VALUES
(358, '60', 'gmpdemo1', 'RM-0601', 'Raw Material', '', 'RM00012', '', '', '0', 'NA', 'Test Specific', 2.00, '5', '', '', '', '', 0, '', '', '', NULL, NULL, 'approve', 'master', '2023-08-02 05:15:14', '', NULL, 'master', '2023-08-02', 'pending', '', 'done', '2023-10-18', '', 'pending', '7', '0', 'IP', '32', '2', '', '', '', '16', '', '', '0000-00-00', '', '', '', 'master', 'reviwed', '2023-08-02 05:17:03', 'master', 'reviwed', '2023-08-02 05:17:13', 'reviwed', '2023-08-02 05:17:23', 'master', 'Active', 0),
(359, '', 'gmpdemo1', 'SS-0359', 'Retest Specification', '', 'RM00012', '', '', '0', 'NA', 'Test Specific', 0.00, '', '', '', '', '', 0, '', NULL, '', NULL, NULL, 'pending', 'master', '2023-08-02 05:21:16', '', NULL, NULL, NULL, 'pending', '', 'pending', '2023-10-18', '', 'pending', '', '', '', '', '', '', '', '', '', '', '', '0000-00-00', '', '', '', '', 'pending', '0000-00-00 00:00:00', '', 'pending', '0000-00-00 00:00:00', 'pending', '0000-00-00 00:00:00', '', 'Active', 0),
(360, '60', 'gmpdemo1', 'RM-060360', 'Raw Material', '', 'RM00013', '', '', '0', 'NA', 'Test Specific', 0.00, '10', '', '', '', '', 0, '', '', '', NULL, NULL, 'approve', 'master', '2023-08-03 04:54:54', '', NULL, 'master', '2023-08-03', 'pending', '', 'pending', '2023-12-14', '', 'pending', '0', '0', 'IP', '0', '0', '', '', '', '0', '', '', '0000-00-00', '', '', '', 'master', 'reviwed', '2023-08-03 04:55:53', 'master', 'reviwed', '2023-08-03 04:56:01', 'reviwed', '2023-08-03 04:56:08', 'master', 'Active', 0),
(361, '60', 'gmpdemo1', 'RM-060361', 'Raw Material', '', 'RM00014', '', '', '0', 'NA', 'Test Specific', 0.00, '0', 'gm', '', '', '', 0, '', '', '', NULL, NULL, 'approve', 'master', '2023-08-07 05:56:02', '', NULL, 'master', '2023-08-07', 'pending', '', 'pending', '2023-08-07', '', 'pending', '0', '0', 'IP', '0', '0', '', '', '', '0', '', '30', '0000-00-00', '', '', '', 'master', 'reviwed', '2023-08-07 05:56:34', 'master', 'reviwed', '2023-08-07 05:56:45', 'reviwed', '2023-08-07 05:56:53', 'master', 'Active', 0),
(362, '60', 'gmpdemo1', 'RM-060362', 'Raw Material', '', 'RM00015', '', '', '0', 'NA', 'Test Specific', 40.00, '0', '', '', '', '', 0, '', '', '', NULL, NULL, 'approve', 'master', '2023-08-08 03:53:02', '', NULL, 'master', '2023-08-08', 'pending', '', 'pending', '2023-08-08', '', 'pending', '20', '0', 'IP', '160', '20', '', '', '', '80', '', '20', '0000-00-00', '', '', '', 'master', 'reviwed', '2023-08-08 03:53:15', 'master', 'reviwed', '2023-08-08 03:53:24', 'reviwed', '2023-08-08 03:53:33', 'master', 'Active', 0),
(363, '60', 'gmpdemo1', 'RM-060363', 'Raw Material', '', 'RM000653', '', '', '0', 'NA', 'Test Specific', 50.00, '0', '', '', '', '', 0, '', '', '', NULL, NULL, 'approve', 'master', '2023-08-31 12:34:28', '', NULL, 'master', '2023-08-31', 'pending', '', 'pending', '2023-08-31', '', 'pending', '30', '0', 'IP', '200', '20', '', '', '', '100', '', '30', '0000-00-00', '', '', '', 'master', 'reviwed', '2023-08-31 12:34:47', 'master', 'reviwed', '2023-08-31 12:34:59', 'reviwed', '2023-08-31 12:35:09', 'master', 'Active', 0);

-- --------------------------------------------------------

--
-- Table structure for table `spec_revision`
--

CREATE TABLE `spec_revision` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `spec_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `specification_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `version_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `change_mode` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reason` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `effective_date` date NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `spec_revision`
--

INSERT INTO `spec_revision` (`id`, `plant_id`, `user_no`, `spec_no`, `specification_no`, `version_no`, `change_mode`, `reason`, `effective_date`, `status`) VALUES
(399, '', 'gmpdemo1', 'RM-0601', '01', '01', '01', 'test', '2023-11-14', 'pending'),
(400, '', 'gmpdemo1', 'RM-060360', '01', '01', '01', 'reason..', '2023-12-30', 'pending'),
(401, '', 'gmpdemo1', 'RM-060361', '65', '676', '658', 'Not required', '2023-08-31', 'pending'),
(402, '', 'gmpdemo1', 'RM-060362', '21', '56', '67', 'Not required', '2023-08-31', 'pending'),
(403, '', 'gmpdemo1', 'RM-060363', '2', '21', '24', 'NA', '2023-09-30', 'pending');

-- --------------------------------------------------------

--
-- Table structure for table `spec_tests`
--

CREATE TABLE `spec_tests` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `specification_no` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `test_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `test` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `subtest` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reference_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `limit_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `lower_limit` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `upper_limit` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `lessthan` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `morethan` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `limits` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_qty` decimal(10,2) NOT NULL,
  `release_stability` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `retest` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'no',
  `outside_testing` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stage` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `calculation` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `tm_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `status` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `method` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `ismethod` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'no',
  `method_details` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `for_micro` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'No',
  `instruments` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `procedures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `remark` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `conditions` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `reagents` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `solutions` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `micro_status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `spec_tests`
--

INSERT INTO `spec_tests` (`id`, `plant_id`, `user_no`, `specification_no`, `test_type`, `test`, `subtest`, `description`, `reference_type`, `limit_type`, `lower_limit`, `upper_limit`, `lessthan`, `morethan`, `unit`, `limits`, `sample_qty`, `release_stability`, `retest`, `outside_testing`, `stage`, `calculation`, `tm_no`, `status`, `method`, `ismethod`, `method_details`, `for_micro`, `instruments`, `procedures`, `remark`, `conditions`, `reagents`, `solutions`, `micro_status`) VALUES
(874, '60', 'gmpdemo1', 'RM-0601', 'Chemical', 'Assay', 'Assay HPLC1', 'test..', 'IP', 'Description', '', '', '', '', '', 'test..', 3.00, NULL, 'Applicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(875, '60', 'gmpdemo1', 'RM-0601', 'Chemical', 'Identification by IR', 'Identification (R)', '', 'BP', 'Range', '2.0', '6.0', '', '', 'gm', '2.0gm to 6.0gm', 4.00, NULL, 'Applicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(876, '60', 'gmpdemo1', 'RM-0601', 'Indentification', 'Identification test', 'Test1', '', 'IP', 'Not LessThan', '', ' 5', '', '', 'gm', 'NLT  5gm', 5.00, NULL, 'NotApplicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(877, '60', 'gmpdemo1', 'RM-0601', 'Microbiology', 'Microbial Limit Pathogens', 'Microbial Contamination', '', 'BP', 'Not MoreThan', '8', '', '', '', 'gm', 'NMT 8gm', 2.00, NULL, 'NotApplicable', 'Applicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(878, '', 'gmpdemo1', 'SS-0359', '', 'Assay', 'Assay HPLC1', 'test..', 'IP', 'Description', '', '', '', '', '', '', 3.00, NULL, 'no', '', NULL, NULL, NULL, 'pending', 'pending', 'no', NULL, 'No', NULL, NULL, NULL, NULL, NULL, NULL, ''),
(879, '', 'gmpdemo1', 'SS-0359', '', 'Identification by IR', 'Identification (R)', '', 'BP', 'Range', '2.0', '6.0', '', '', 'gm', '', 4.00, NULL, 'no', '', NULL, NULL, NULL, 'pending', 'pending', 'no', NULL, 'No', NULL, NULL, NULL, NULL, NULL, NULL, ''),
(880, '', 'gmpdemo1', 'SS-0359', '', 'Identification test', 'Test1', '', 'IP', 'Not LessThan', '', ' 5', '', '', 'gm', '', 5.00, NULL, 'NotApplicable', '', NULL, NULL, NULL, 'pending', 'pending', 'no', NULL, 'No', NULL, NULL, NULL, NULL, NULL, NULL, ''),
(881, '', 'gmpdemo1', 'SS-0359', '', 'Microbial Limit Pathogens', 'Microbial Contamination', '', 'BP', 'Not MoreThan', '8', '', '', '', 'gm', '', 2.00, NULL, 'NotApplicable', '', NULL, NULL, NULL, 'pending', 'pending', 'no', NULL, 'No', NULL, NULL, NULL, NULL, NULL, NULL, ''),
(882, '60', 'gmpdemo1', 'RM-060360', 'Chemical', 'Assay', 'Assay HPLC1', 'test', 'IP', 'Description', '', '', '', '', '', 'test', 4.00, NULL, 'Applicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(883, '60', 'gmpdemo1', 'RM-060360', 'Chemical', 'Identification by IR', 'Identification (R)', '', 'IP', 'Range', '4.0', '8.0', '', '', 'Kg', '4.0Kg to 8.0Kg', 8.00, NULL, 'NotApplicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(884, '60', 'gmpdemo1', 'RM-060360', 'Indentification', 'Identification test', 'Test1', '', 'IP', 'Not LessThan', '', '10', '', '', 'Kg', 'NLT 10Kg', 10.00, NULL, 'Applicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(885, '60', 'gmpdemo1', 'RM-060360', 'LOD', 'Loss on Drying', '', '', 'IP', 'Not MoreThan', '12', '', '', '', 'Kg', 'NMT 12Kg', 5.00, NULL, 'NotApplicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"A+B=8\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(886, '60', 'gmpdemo1', 'RM-060361', 'Chemical', 'Assay', 'Assay HPLC1', '', 'IP', 'Range', '39', '40', '', '', 'Kg', '39Kg to 40Kg', 40.00, NULL, 'NotApplicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"a+b=c\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(887, '60', 'gmpdemo1', 'RM-060361', 'Microbiology', 'Microbial Limit Pathogens', 'Microbial Limit Pathogens', '', 'IP', 'Range', '38', '40', '', '', 'Kg', '38Kg to 40Kg', 40.00, NULL, 'NotApplicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"a+b=c\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(888, '60', 'gmpdemo1', 'RM-060361', 'Chemical', 'Assay', 'Assay HPLC1', 'test', 'IP', 'Description', '', '', '', '', '', '', 40.00, NULL, 'Not Applicable', '', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"a+b=c\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(889, '60', 'gmpdemo1', 'RM-060362', 'Chemical', 'Assay', 'Assay HPLC1', '', 'IP', 'Range', '19', '20', '', '', 'Kg', '19Kg to 20Kg', 20.00, NULL, 'Applicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"a+b=c\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(890, '60', 'gmpdemo1', 'RM-060362', 'Microbiology', 'Microbial Limit Pathogens', 'Microbial Limit Pathogens', '', 'IP', 'Range', '39', '40', '', '', 'Kg', '39Kg to 40Kg', 40.00, NULL, 'NotApplicable', 'NotApplicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"a+b=c\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(891, '60', 'gmpdemo1', 'RM-060362', 'Chemical', 'Assay', 'Assay HPLC1', 'test', 'IP', 'Description', '', '', '', '', '', '', 40.00, NULL, 'Not Applicable', '', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"a+b=c\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(892, '60', 'gmpdemo1', 'RM-060363', 'Chemical', 'Assay', 'Assay HPLC1', '', 'IP', 'Range', '29', '30', '', '', 'Kg', '29Kg to 30Kg', 30.00, NULL, 'Applicable', 'Applicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"a+b=c\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(893, '60', 'gmpdemo1', 'RM-060363', 'Microbiology', 'Microbial Limit Pathogens', 'Microbial Limit Pathogens', '', 'IP', 'Range', '49', '50', '', '', 'Kg', '49Kg to 50Kg', 50.00, NULL, 'Applicable', 'Applicable', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"a+b=c\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, ''),
(894, '60', 'gmpdemo1', 'RM-060363', 'Chemical', 'Assay', 'Assay HPLC1', '', 'IP', 'Range', '40', '38', '', '', 'Kg', '40Kg to 38Kg', 40.00, NULL, 'Applicable', '', NULL, NULL, NULL, 'pending', 'active', 'no', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]},{\"name\":\"Calculations\",\"option\":\"calculation\",\"status\":true,\"list\":[\"a+b=c\"]}]', 'No', NULL, '', NULL, NULL, NULL, NULL, '');

-- --------------------------------------------------------

--
-- Table structure for table `spillage`
--

CREATE TABLE `spillage` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `material_code` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qty` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reason` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `incident_cause` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `incident_type` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `check_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime NOT NULL,
  `approve_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stability_batch`
--

CREATE TABLE `stability_batch` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `user_no` varchar(50) NOT NULL DEFAULT 'gmpdemo1',
  `stability_no` varchar(50) NOT NULL,
  `batch_no` varchar(50) NOT NULL,
  `mfg_date` date NOT NULL,
  `exp_date` date NOT NULL,
  `purpose` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `stability_chember`
--

CREATE TABLE `stability_chember` (
  `id` int NOT NULL,
  `plant_id` varchar(100) NOT NULL,
  `user_no` varchar(100) NOT NULL,
  `chember_no` varchar(100) NOT NULL,
  `usages` varchar(100) NOT NULL,
  `temp` varchar(100) NOT NULL,
  `humidity` varchar(100) NOT NULL,
  `entry_by` varchar(100) NOT NULL,
  `entry_date` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stability_study`
--

CREATE TABLE `stability_study` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `specification_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `packing` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `market` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batches` int NOT NULL,
  `batch_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_qty` int NOT NULL,
  `unit` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `sampling` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `sampling_person` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `charging` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `sampling_data` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `conditions` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime NOT NULL,
  `remark` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stability_testing`
--

CREATE TABLE `stability_testing` (
  `id` int NOT NULL,
  `plant_id` varchar(100) NOT NULL,
  `user_no` varchar(100) NOT NULL,
  `stability_no` varchar(100) NOT NULL,
  `product_code` varchar(100) NOT NULL,
  `specification_no` varchar(100) NOT NULL,
  `batch_no` varchar(100) NOT NULL,
  `conditions` text NOT NULL,
  `intervals` text NOT NULL,
  `interval_date` varchar(100) NOT NULL,
  `sample_qty` varchar(100) NOT NULL,
  `entry_by` varchar(100) NOT NULL,
  `entry_date` varchar(100) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'pending',
  `tests` text NOT NULL,
  `testing_by` varchar(50) NOT NULL,
  `testing_date` varchar(50) NOT NULL,
  `approve_date` varchar(50) NOT NULL,
  `approve_by` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stagemaster`
--

CREATE TABLE `stagemaster` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stages` varchar(60) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stages`
--

CREATE TABLE `stages` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfr_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `process` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stage` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isprocedure` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `procedures` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isinstruction` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `instructions` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isequipment` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipments` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isclerance` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `prod_clearances` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qa_clearances` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isweighing` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `weighings` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isenvironment` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `environments` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `env_frequency` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `env_freq_unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `env_qa` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ischeck` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checks` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inprocess_frequency` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inprocess_production` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inprocess_qa` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inprocess_qc` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inprocess_freq_unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isinitial` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `initial_checks` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `initial_frequency` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `initial_freq_unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `issieve` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sieve` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isscreen` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `screen` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isdrying` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `iswash` varchar(3) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `yields` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isinprocess` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isqcchecks` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `weighing_frequency` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `we_frq_unit` varchar(60) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `weighing_qa` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stages_ipqc`
--

CREATE TABLE `stages_ipqc` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `material_type` varchar(25) NOT NULL,
  `product_type` varchar(50) NOT NULL,
  `product_name` varchar(50) NOT NULL,
  `product_code` varchar(20) NOT NULL,
  `exp_yeild_min` varchar(20) NOT NULL,
  `exp_yeild_max` varchar(20) NOT NULL,
  `stages_test` text NOT NULL,
  `entry_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `user_no` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `stages_ipqc_dtl`
--

CREATE TABLE `stages_ipqc_dtl` (
  `id` int NOT NULL,
  `stage_hdr_id` int NOT NULL,
  `process_type` varchar(50) NOT NULL,
  `stage_name` varchar(50) NOT NULL,
  `stage` varchar(50) NOT NULL,
  `ipqc_testing` varchar(3) NOT NULL,
  `next_stage` varchar(3) NOT NULL,
  `exp_yeild_percent` varchar(15) NOT NULL,
  `yeild_unit` varchar(50) NOT NULL,
  `split_into_lots` varchar(5) NOT NULL,
  `blending_mixing` varchar(5) NOT NULL,
  `test_name` varchar(25) NOT NULL,
  `sub_test` varchar(25) NOT NULL,
  `result_type` varchar(25) NOT NULL,
  `unit` varchar(25) NOT NULL,
  `lower_limit` varchar(25) NOT NULL,
  `upper_limit` varchar(25) NOT NULL,
  `less_than_value` varchar(15) NOT NULL,
  `more_than_value` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `standard_master`
--

CREATE TABLE `standard_master` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `standard_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_subtype` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `standard` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grade` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Active',
  `entry_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `state`
--

CREATE TABLE `state` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `state_code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `state_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'approve'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `state_master`
--

CREATE TABLE `state_master` (
  `id` int NOT NULL,
  `state_code` varchar(50) NOT NULL,
  `state_name` varchar(50) NOT NULL,
  `country` varchar(50) NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'active',
  `plant_id` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `stationary_management`
--

CREATE TABLE `stationary_management` (
  `id` int NOT NULL,
  `stationary_id` int NOT NULL DEFAULT '45',
  `stationary` varchar(100) NOT NULL,
  `no_required` varchar(100) NOT NULL,
  `company` varchar(100) NOT NULL,
  `details` varchar(100) NOT NULL,
  `i_no1` int NOT NULL,
  `checked_by` varchar(100) NOT NULL,
  `status` varchar(10) NOT NULL DEFAULT 'PENDING',
  `plant_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `std_weight`
--

CREATE TABLE `std_weight` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `trolly` varchar(20) NOT NULL,
  `department` varchar(20) NOT NULL,
  `last_date` date NOT NULL,
  `reverification_frequency` varchar(20) NOT NULL,
  `std_wt_dtl` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `std_weight`
--

INSERT INTO `std_weight` (`id`, `plant_id`, `trolly`, `department`, `last_date`, `reverification_frequency`, `std_wt_dtl`) VALUES
(9, 60, '01', 'Account', '2023-08-23', '6 month', '[{\"type\":\"General\",\"weight_description\":\"10\",\"moc\":\"Iron\",\"unit\":\"Kg\"}]');

-- --------------------------------------------------------

--
-- Table structure for table `steam_operation`
--

CREATE TABLE `steam_operation` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `boiler_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `meter_reading` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `diff` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pump_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pressure` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `RPM1` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `RPM2` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `BED1` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `BED2` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `draught_pr` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tank_level` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `steam_pr` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `entry_time` time NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stereo`
--

CREATE TABLE `stereo` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL DEFAULT '28',
  `noof_stereo` int NOT NULL,
  `stereo_width` int NOT NULL,
  `check` varchar(100) NOT NULL,
  `approve` varchar(100) NOT NULL,
  `batch_no` int NOT NULL,
  `lic_no` int NOT NULL,
  `mfg_date` date NOT NULL,
  `exp_date` date NOT NULL,
  `mrp` int NOT NULL,
  `length` int NOT NULL,
  `width` int NOT NULL,
  `shape` varchar(100) NOT NULL,
  `stereo_type` varchar(100) NOT NULL,
  `no_of_order` int NOT NULL,
  `upload` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `stereo_dist`
--

CREATE TABLE `stereo_dist` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `distruction_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `step_name` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stereo_distruction`
--

CREATE TABLE `stereo_distruction` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `distruction_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dosage_form` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_name` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department_name` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `request_by_employee` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reason_for_request` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `distruction_loc` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `action` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `i_no1` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `stock_book`
--

CREATE TABLE `stock_book` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `inword_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inword_date` date NOT NULL,
  `grn_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ar_no` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stock_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Normal',
  `vendor_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `manufacturer_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qty` decimal(10,2) NOT NULL,
  `lod_per` decimal(10,2) NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rate` decimal(10,2) NOT NULL,
  `rate_per` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfg_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `containers` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `receiving_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grn_date` date NOT NULL,
  `release_date` date NOT NULL,
  `retest_date` date NOT NULL,
  `retest_status` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Pending',
  `assay` decimal(10,2) NOT NULL,
  `required_for` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `client_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `section` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `rack_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'quarantine',
  `pack_size` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tare_wt` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `total_containers` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `undertest_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `stock_book`
--

INSERT INTO `stock_book` (`id`, `plant_id`, `user_no`, `inword_no`, `inword_date`, `grn_no`, `ar_no`, `batch_no`, `stock_type`, `vendor_no`, `manufacturer_no`, `material_code`, `qty`, `lod_per`, `unit`, `rate`, `rate_per`, `mfg_date`, `exp_date`, `containers`, `receiving_no`, `grn_date`, `release_date`, `retest_date`, `retest_status`, `assay`, `required_for`, `client_no`, `section`, `rack_no`, `status`, `pack_size`, `tare_wt`, `entry_by`, `entry_date`, `approve_by`, `approve_date`, `total_containers`, `undertest_qty`, `approve_qty`, `product_code`) VALUES
(467, '', 'gmpdemo1', '', '0000-00-00', 'GRN/22/R/0522', 'AR-01', '1', 'Normal', 'V10001', '', 'RM00012', 100.00, 0.00, 'Kg', 0.00, '', '2023-07-05', '2024-06-04', '', '', '2023-08-02', '2023-08-03', '0000-00-00', 'Pending', 0.00, '', '', '', '', 'Approved', '50', '', 'master', '2023-08-02', '', NULL, '2', '0', '', ''),
(468, '', 'gmpdemo1', '', '0000-00-00', 'GRN/22/R/0523', 'AR-02', '1', 'Normal', 'V10646', '', 'RM00013', 300.00, 0.00, 'Kg', 0.00, '', '2023-06-21', '2024-10-16', '', '', '2023-08-03', '2023-08-03', '0000-00-00', 'Pending', 0.00, '', '', '', '', 'Approved', '100', '', 'master', '2023-08-03', '', NULL, '3', '12.33', '', ''),
(469, '', 'gmpdemo1', '', '0000-00-00', 'GRN/22/R/0524', 'AR-03', 'B031', 'Normal', 'V10647', '', 'RM00014', 200.00, 0.00, 'Kg', 0.00, '', '2023-08-07', '2023-08-31', '', '', '2023-08-07', '2023-08-07', '0000-00-00', 'Pending', 0.00, '', '', '', '', 'Approved', '100', '', 'master', '2023-08-07', '', NULL, '2', '0', '', ''),
(470, '', 'gmpdemo1', '', '0000-00-00', 'GRN/22/R/0526', 'AR-04', 'B087', 'Normal', 'V10648', '', 'RM00015', 100.00, 0.00, 'Kg', 0.00, '', '2023-08-08', '2023-08-31', '', '', '2023-08-08', '0000-00-00', '0000-00-00', 'Pending', 0.00, '', '', '', '', 'Under Test', '6', '', 'master', '2023-08-08', '', NULL, '16', '3.91', '', ''),
(471, '', 'gmpdemo1', '', '0000-00-00', 'GRN/22/R/0527', 'AR-05', 'B077', 'Normal', 'V10651', '', 'RM000653', 300.00, 0.00, 'Kg', 0.00, '', '2023-08-31', '2023-09-30', '', '', '2023-08-31', '0000-00-00', '0000-00-00', 'Pending', 0.00, '', '', '', '', 'Under Test', '100', '', 'master', '2023-08-31', '', NULL, '3', '73.33', '', '');

-- --------------------------------------------------------

--
-- Stand-in structure for view `stock_view`
-- (See below for the actual view)
--
CREATE TABLE `stock_view` (
`ar_no` varchar(25)
,`challan_date` date
,`challan_no` varchar(20)
,`grn_no` varchar(50)
,`grn_status` varchar(20)
,`qty_after_sampling` decimal(10,2)
,`received_qty` decimal(10,2)
,`receiving_date` date
,`receiving_no` varchar(100)
,`receving_status` varchar(20)
,`sampling_id` varchar(20)
,`sampling_status` varchar(20)
,`stock_id` int
,`testing_id` varchar(20)
,`testing_status` varchar(100)
);

-- --------------------------------------------------------

--
-- Table structure for table `storage_condition`
--

CREATE TABLE `storage_condition` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `storage_condition` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'approve'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `storage_conditions`
--

CREATE TABLE `storage_conditions` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `storage_condition` varchar(25) NOT NULL,
  `temperature` varchar(25) NOT NULL,
  `humidity` varchar(5) NOT NULL,
  `storage_display_name` varchar(25) NOT NULL,
  `entry_by` varchar(50) NOT NULL,
  `entry_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `status` varchar(7) NOT NULL DEFAULT 'Active'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `subcategory`
--

CREATE TABLE `subcategory` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `material_subtype` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sub_type` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sub_category` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `subtest`
--

CREATE TABLE `subtest` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `classification` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dosage_form` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `test_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Chemical',
  `test` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `subtest` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `subtest_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `subtest`
--

INSERT INTO `subtest` (`id`, `plant_id`, `user_no`, `classification`, `dosage_form`, `test_type`, `test`, `subtest`, `status`, `entry_by`, `entry_date`, `approve_by`, `approve_date`, `subtest_no`) VALUES
(66, '', 'gmpdemo1', '', '', 'Chemical', 'Assay', 'Assay HPLC1', 'pending', '', '0000-00-00 00:00:00', '', NULL, 'ST001'),
(67, '', 'gmpdemo1', '', '', 'Chemical', 'Assay', 'Test A', 'pending', '', '0000-00-00 00:00:00', '', NULL, 'ST067'),
(68, '', 'gmpdemo1', '', '', 'Chemical', 'Identification by IR', 'Identification (R)', 'pending', '', '0000-00-00 00:00:00', '', NULL, 'ST068'),
(69, '', 'gmpdemo1', '', '', 'Microbiology', 'Microbial Limit Pathogens', 'Microbial Limit Pathogens', 'pending', '', '0000-00-00 00:00:00', '', NULL, 'ST069'),
(70, '', 'gmpdemo1', '', '', 'Microbiology', 'Microbial Limit Pathogens', 'Microbial Contamination', 'pending', '', '0000-00-00 00:00:00', '', NULL, 'ST070'),
(71, '', 'gmpdemo1', '', '', 'Indentification', 'Identification test', 'Test1', 'pending', '', '0000-00-00 00:00:00', '', NULL, 'ST071'),
(72, '', 'gmpdemo1', '', '', 'Indentification', 'Identification test', 'Test 2', 'pending', '', '0000-00-00 00:00:00', '', NULL, 'ST072'),
(73, '', 'gmpdemo1', '', '', 'Physical', 'Test A', 'Test 1', 'pending', '', '0000-00-00 00:00:00', '', NULL, 'ST073');

--
-- Triggers `subtest`
--
DELIMITER $$
CREATE TRIGGER `subtest_no_insert` BEFORE INSERT ON `subtest` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM subtest ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.subtest_no = concat('ST', LPAD(CONVERT(@lastID, CHAR), 3, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `swab_analysis`
--

CREATE TABLE `swab_analysis` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `area_name` varchar(50) NOT NULL,
  `equipment_name` varchar(50) NOT NULL,
  `total_plate` varchar(50) NOT NULL,
  `total_fungal` varchar(50) NOT NULL,
  `checked_by` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `task`
--

CREATE TABLE `task` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `employee` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `task` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `estimated_start` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `estimated_complete` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `assign_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `assign_date` datetime NOT NULL,
  `start_date` datetime DEFAULT NULL,
  `complete_date` datetime DEFAULT NULL,
  `remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime DEFAULT NULL,
  `check_remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` varchar(9999) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `evaluation` varchar(9999) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tax_invoice`
--

CREATE TABLE `tax_invoice` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `invoice_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `order_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `invoice_type` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reverse` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'N',
  `client_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `branch` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `po_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `po_date` date NOT NULL,
  `pay_mode` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gst_rate` decimal(10,2) NOT NULL,
  `gross_total` decimal(10,2) NOT NULL,
  `disc_total` decimal(10,2) NOT NULL,
  `tax_total` decimal(10,2) NOT NULL,
  `net_total` decimal(10,2) NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `challan_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `challan_date` date DEFAULT NULL,
  `AssVal` decimal(10,2) NOT NULL,
  `CgstVal` decimal(10,2) NOT NULL,
  `SgstVal` decimal(10,2) NOT NULL,
  `IgstVal` decimal(10,2) NOT NULL,
  `CesVal` decimal(10,2) NOT NULL,
  `StCesVal` decimal(10,2) NOT NULL,
  `Discount` decimal(10,2) NOT NULL,
  `OthChrg` decimal(10,2) NOT NULL,
  `RndOffAmt` decimal(10,2) NOT NULL,
  `TotInvVal` decimal(10,2) NOT NULL,
  `TotInvValFc` decimal(10,2) NOT NULL,
  `InvStDt` date NOT NULL,
  `InvEndDt` date NOT NULL,
  `invoice_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `invoice_data` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `AckNo` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `AckDt` datetime NOT NULL,
  `Irn` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `SignedInvoice` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `SignedQRCode` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cancel_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cancel_date` datetime DEFAULT NULL,
  `ewaybill_status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `sales_data` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `tax_invoice`
--
DELIMITER $$
CREATE TRIGGER `invoice` BEFORE INSERT ON `tax_invoice` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM tax_invoice ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.invoice_no = concat('IN-', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `tax_invoice_product`
--

CREATE TABLE `tax_invoice_product` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `order_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `invoice_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `workorder_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfg_date` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `exp_date` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qty` decimal(10,2) NOT NULL,
  `f_qty` decimal(10,2) NOT NULL,
  `sale_rate` decimal(10,2) NOT NULL,
  `mrp` decimal(10,2) NOT NULL,
  `disc_per` decimal(10,2) NOT NULL,
  `gst_per` decimal(10,2) NOT NULL,
  `gross_total` decimal(10,2) NOT NULL,
  `disc_total` decimal(10,2) NOT NULL,
  `tax_total` decimal(10,2) NOT NULL,
  `taxable` decimal(10,2) NOT NULL,
  `SgstAmt` decimal(10,2) NOT NULL,
  `CgstAmt` decimal(10,2) NOT NULL,
  `IgstAmt` decimal(10,2) NOT NULL,
  `CesRt` decimal(10,2) NOT NULL,
  `CesAmt` decimal(10,2) NOT NULL,
  `CesNonAdvlAmt` decimal(10,2) NOT NULL,
  `StateCesRt` decimal(10,2) NOT NULL,
  `StateCesAmt` decimal(10,2) NOT NULL,
  `StateCesNonAdvlAmt` decimal(10,2) NOT NULL,
  `OthChrg` decimal(10,2) NOT NULL,
  `net_total` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `technical_info`
--

CREATE TABLE `technical_info` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ti_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_size` int NOT NULL,
  `step` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'CRUDE',
  `stage` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_qty` decimal(10,2) NOT NULL,
  `unit` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `accept_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `accept_date` date NOT NULL,
  `tests` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ar_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `analysis_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `analysis_date` datetime DEFAULT NULL,
  `check_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime DEFAULT NULL,
  `bmr_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `receive_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `receive_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `technical_info`
--
DELIMITER $$
CREATE TRIGGER `technical_info_insert` BEFORE INSERT ON `technical_info` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM technical_info ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.ti_no = concat('TI', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `temperature`
--

CREATE TABLE `temperature` (
  `id` int NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `thermo_hygrometer` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `temperature` decimal(10,2) NOT NULL,
  `min_temp` decimal(10,2) NOT NULL,
  `max_temp` decimal(10,2) NOT NULL,
  `humidity` decimal(10,2) NOT NULL,
  `department` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `section` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `bmr_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stage` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `entry_time` time NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `temp_refrigerator`
--

CREATE TABLE `temp_refrigerator` (
  `id` int NOT NULL,
  `ref_id` int NOT NULL,
  `thermo_id` int NOT NULL,
  `entry_time` time NOT NULL,
  `entry_by` varchar(50) NOT NULL,
  `checked_by` varchar(50) NOT NULL,
  `observe_temp` varchar(50) NOT NULL,
  `min_temp` varchar(50) NOT NULL,
  `max_temp` varchar(50) NOT NULL,
  `done_by` varchar(50) NOT NULL,
  `entry_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `terms`
--

CREATE TABLE `terms` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `term_heading` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `term` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT 'approve'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `terms`
--

INSERT INTO `terms` (`id`, `plant_id`, `term_heading`, `term`, `entry_by`, `entry_date`, `status`) VALUES
(17, '', 'Terms and Condition', 'Product Quality should be Checked and Maintained', 'master', '2023-08-02 12:51:56', 'approve'),
(18, '', 'Shipping', 'Should be shipped on the given timeline', 'master', '2023-08-02 12:52:38', 'approve'),
(19, '', 'Payment Terms', '60 days', 'master', '2023-08-02 12:53:27', 'approve');

-- --------------------------------------------------------

--
-- Table structure for table `test`
--

CREATE TABLE `test` (
  `id` int NOT NULL,
  `test_name` varchar(45) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `classification` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dosage_form` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `test_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'Chemical',
  `test` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'active',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `sample_qty` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `test_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grade` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `maxlead_time` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `minlead_time` varchar(40) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `test`
--

INSERT INTO `test` (`id`, `test_name`, `user_no`, `classification`, `dosage_form`, `test_type`, `test`, `status`, `entry_by`, `entry_date`, `approve_by`, `approve_date`, `sample_qty`, `unit`, `test_no`, `plant_id`, `grade`, `maxlead_time`, `minlead_time`) VALUES
(56, '', 'gmpdemo1', '', '', 'Chemical', 'Assay', 'active', 'master', '2023-08-02 16:55:39', '', NULL, '', '', 'T001', '', '', '', ''),
(57, '', 'gmpdemo1', '', '', 'Chemical', 'Identification by IR', 'active', 'master', '2023-08-02 16:56:27', '', NULL, '', '', 'T057', '', '', '', ''),
(58, '', 'gmpdemo1', '', '', 'Microbiology', 'Microbial Limit Pathogens', 'active', 'master', '2023-08-02 16:58:49', '', NULL, '', '', 'T058', '', '', '', ''),
(59, '', 'gmpdemo1', '', '', 'Indentification', 'Identification test', 'active', 'master', '2023-08-02 17:00:31', '', NULL, '', '', 'T059', '', '', '', ''),
(60, '', 'gmpdemo1', '', '', 'LOD', 'Loss on Drying', 'active', 'master', '2023-08-02 17:01:02', '', NULL, '', '', 'T060', '', '', '', ''),
(61, '', 'gmpdemo1', '', '', 'Physical', 'Test A', 'active', 'master', '2023-08-03 16:49:57', '', NULL, '', '', 'T061', '', '', '', '');

--
-- Triggers `test`
--
DELIMITER $$
CREATE TRIGGER `test_no_insert` BEFORE INSERT ON `test` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM test ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.test_no = concat('T', LPAD(CONVERT(@lastID, CHAR), 3, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `testing`
--

CREATE TABLE `testing` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `testing_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grn_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ar_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `testing_person` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `specification_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_grade` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `check_date` datetime DEFAULT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `t_no1` int NOT NULL,
  `iscoa` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `recheck` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'no',
  `inward_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_date` date NOT NULL,
  `sampling_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `alalysis_start_date` date NOT NULL,
  `alalysis_start_time` time NOT NULL,
  `alalysis_end_date` date NOT NULL,
  `alalysis_end_time` time NOT NULL,
  `is_RDS` int DEFAULT '2' COMMENT '1=RDS 0=no RDS',
  `allocation` varchar(9999) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `testing`
--

INSERT INTO `testing` (`id`, `plant_id`, `user_no`, `testing_no`, `sampling_no`, `grn_no`, `ar_no`, `material_code`, `status`, `entry_by`, `entry_date`, `testing_person`, `specification_no`, `material_grade`, `check_by`, `check_date`, `approve_by`, `approve_date`, `t_no1`, `iscoa`, `recheck`, `inward_no`, `sampling_date`, `sampling_by`, `alalysis_start_date`, `alalysis_start_time`, `alalysis_end_date`, `alalysis_end_time`, `is_RDS`, `allocation`) VALUES
(148, '60', 'gmpdemo1', 'SBT-001', 'S0001', 'GRN/22/R/0522', 'AR-1', 'RM00012', 'Approved', 'master', '2023-08-03', 'done', 'SS-0359', '', 'master', '2023-08-03 05:44:17', 'master', '2023-08-03 05:44:24', 1, 'pending', 'no', '', '0000-00-00', '', '2023-08-03', '15:48:00', '2023-08-03', '17:44:00', 0, ''),
(149, '60', 'gmpdemo1', 'SBT-002', 'S0260', 'GRN/22/R/0523', 'AR-2', 'RM00013', 'Approved', 'master', '2023-08-03', 'done', 'RM-060360', '', 'master', '2023-08-03 05:39:53', 'master', '2023-08-03 05:40:12', 2, 'pending', 'no', '', '0000-00-00', '', '0000-00-00', '00:00:00', '0000-00-00', '00:00:00', 1, ''),
(150, '60', 'gmpdemo1', 'SBT-003', 'S0261', 'GRN/22/R/0524', 'AR-3', 'RM00014', 'Approved', 'master', '2023-08-07', 'done', 'RM-060361', '', 'master', '2023-08-07 06:10:19', 'master', '2023-08-07 06:10:41', 3, 'pending', 'no', '', '0000-00-00', '', '0000-00-00', '00:00:00', '0000-00-00', '00:00:00', 1, ''),
(151, '60', 'gmpdemo1', 'SBT-004', 'S0262', 'GRN/22/R/0526', 'AR-4', 'RM00015', 'checked', 'master', '2023-08-08', 'done', 'RM-060362', '', 'master', '2023-08-08 04:13:26', '', NULL, 4, 'pending', 'no', '', '0000-00-00', '', '0000-00-00', '00:00:00', '0000-00-00', '00:00:00', 1, ''),
(152, '60', 'gmpdemo1', 'SBT-005', 'S0263', 'GRN/22/R/0527', 'AR-5', 'RM000653', 'checked', 'master', '2023-08-31', 'done', 'RM-060363', '', 'master', '2023-08-31 02:45:30', '', NULL, 5, 'pending', 'no', '', '0000-00-00', '', '0000-00-00', '00:00:00', '0000-00-00', '00:00:00', 1, '');

-- --------------------------------------------------------

--
-- Table structure for table `testing_tests`
--

CREATE TABLE `testing_tests` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `testing_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `fg_sampling_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `test` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `subtest` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ismethod` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'yes',
  `method_details` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `isoutside` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `person` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `person_alt` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `testing_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_start_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_end_time` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `result` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `descriptions` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `observation` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `fail_status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `fail_form` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `fail_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `correct_result` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `specification_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `spec_test_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `limits` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_person` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `grn_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `outside_testing` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `lab_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checked_by` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checked_date` datetime NOT NULL,
  `checker_remarks` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checker_action` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `old_result` int NOT NULL,
  `retest_start_date` date NOT NULL,
  `retest_start_time` time NOT NULL,
  `retest_remarks` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `retested_by` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `retest_date` datetime NOT NULL,
  `incident_oos_no` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `release_status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `spec_test_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `error` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `brand_generic` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `testing_tests`
--

INSERT INTO `testing_tests` (`id`, `plant_id`, `user_no`, `testing_no`, `fg_sampling_no`, `test`, `subtest`, `description`, `ismethod`, `method_details`, `isoutside`, `person`, `person_alt`, `testing_date`, `testing_start_time`, `testing_end_time`, `result`, `remark`, `start_time`, `end_time`, `descriptions`, `status`, `observation`, `fail_status`, `fail_form`, `fail_no`, `correct_result`, `specification_no`, `spec_test_no`, `limits`, `testing_person`, `batch_no`, `grn_no`, `outside_testing`, `lab_no`, `checked_by`, `checked_date`, `checker_remarks`, `checker_action`, `old_result`, `retest_start_date`, `retest_start_time`, `retest_remarks`, `retested_by`, `retest_date`, `incident_oos_no`, `release_status`, `spec_test_id`, `testing_status`, `error`, `brand_generic`) VALUES
(373, '', 'gmpdemo1', 'SBT-002', '', 'Assay', 'Assay HPLC1', '\n                                                 test', 'No', '1', 'No', '', '', '', '', '', 'ok', 'ok', NULL, '17:37:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060360', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', ''),
(374, '', 'gmpdemo1', 'SBT-002', '', 'Identification by IR', 'Identification (R)', '\n                                                 ', 'No', '1', 'No', '', '', '', '', '', 'ok', 'ok', NULL, '17:38:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060360', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', ''),
(375, '', 'gmpdemo1', 'SBT-002', '', 'Identification test', 'Test1', '\n                                                 ', 'No', '1', 'No', '', '', '', '', '', 'ok', 'ok', NULL, '17:38:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060360', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', ''),
(376, '', 'gmpdemo1', 'SBT-002', '', 'Loss on Drying', '', '\n                                                 ', 'No', '1', 'No', '', '', '', '', '', 'ok', 'ok', NULL, '17:38:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060360', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', ''),
(377, '', 'gmpdemo1', 'SBT-001', '', 'Assay', 'Assay HPLC1', 'test..', 'yes', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', '', '', NULL, '2023-08-03', '16:47', '17:43', 'ok', NULL, '15:48:00', '17:44:00', '', 'pending', '', 'pending', '', '', '', 'RM-0601', '874', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', 'Complies', '', ''),
(378, '', 'gmpdemo1', 'SBT-001', '', 'Identification by IR', 'Identification (R)', '', 'yes', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', '', '', NULL, '2023-08-03', '16:44', '17:43', 'done', NULL, '15:48:00', '17:44:00', '', 'pending', '', 'pending', '', '', '', 'RM-0601', '875', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', 'Complies', '', ''),
(379, '', 'gmpdemo1', 'SBT-001', '', 'Identification test', 'Test1', '', 'yes', '[{\"name\":\"Procedure / method Description\",\"option\":\"procedure\",\"status\":true,\"list\":[]}]', '', '', NULL, '2023-08-03', '15:46', '17:43', 'ok', NULL, '15:48:00', '17:44:00', '', 'pending', '', 'pending', '', '', '', 'RM-0601', '876', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', 'Complies', '', ''),
(380, '', 'gmpdemo1', 'SBT-003', '', 'Assay', 'Assay HPLC1', '\n                                                 ', 'No', '1', 'No', '', '', '', '', '', 'ok', 'OK', NULL, '18:08:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060361', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', ''),
(381, '', 'gmpdemo1', 'SBT-003', '', 'Assay', 'Assay HPLC1', '\n                                                 test', 'No', '1', 'No', '', '', '', '', '', 'ok', 'OK', NULL, '18:09:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060361', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', ''),
(382, '', 'gmpdemo1', 'SBT-004', '', 'Assay', 'Assay HPLC1', '\n                                                 ', 'No', '1', 'No', '', '', '', '', '', 'ok', 'Ok', NULL, '16:13:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060362', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', ''),
(383, '', 'gmpdemo1', 'SBT-004', '', 'Assay', 'Assay HPLC1', '\n                                                 test', 'No', '1', 'No', '', '', '', '', '', 'ok', 'Ok', NULL, '16:12:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060362', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', ''),
(384, '', 'gmpdemo1', 'SBT-005', '', 'Assay', 'Assay HPLC1', '\n                                                 ', 'No', '1', 'Yes', '', '', '', '', '', 'ok', 'OK', NULL, '14:44:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060363', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', ''),
(385, '', 'gmpdemo1', 'SBT-005', '', 'Assay', 'Assay HPLC1', '\n                                                 ', 'No', '1', 'No', '', '', '', '', '', 'ok', 'OK', NULL, '14:45:00', '', 'inprocess', '', 'pending', '', '', '', 'RM-060363', '', '', '', '', '', '', '', '', '0000-00-00 00:00:00', '', '', 0, '0000-00-00', '00:00:00', '', '', '0000-00-00 00:00:00', '', '', '', '', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `test_methods`
--

CREATE TABLE `test_methods` (
  `id` int NOT NULL,
  `test_id` int NOT NULL,
  `spec_test_id` int NOT NULL,
  `chemical_reagents` text NOT NULL,
  `balance` varchar(5000) NOT NULL,
  `equipment_instruments` text NOT NULL,
  `glasswares` text NOT NULL,
  `dilutions` text NOT NULL,
  `calculations` text NOT NULL,
  `standards` text NOT NULL,
  `procedure` mediumtext NOT NULL,
  `gc` text NOT NULL,
  `uw` text NOT NULL,
  `volumetric_solutions` text NOT NULL,
  `hplc` text NOT NULL,
  `solution_preparation` text NOT NULL,
  `entry_by` varchar(25) NOT NULL,
  `entry_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `media` text NOT NULL,
  `phases` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `test_methods`
--

INSERT INTO `test_methods` (`id`, `test_id`, `spec_test_id`, `chemical_reagents`, `balance`, `equipment_instruments`, `glasswares`, `dilutions`, `calculations`, `standards`, `procedure`, `gc`, `uw`, `volumetric_solutions`, `hplc`, `solution_preparation`, `entry_by`, `entry_on`, `media`, `phases`) VALUES
(379, 892, 892, '[{\"id\":\"262\",\"user_no\":\"gmpdemo1\",\"chemical_no\":\"C-0262\",\"chemical_name\":\"Ethanol Absolute Anhydrous\",\"molecular_wt\":\"46.08\",\"pack_size\":\"0.00\",\"cas_name\":\"64-17-5\",\"grade\":\"AR\",\"make\":[],\"unit\":\"\",\"gst\":\"0.00\",\"hsn\":\"\",\"status\":\"approve\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02\",\"approve_by\":\"\",\"approve_date\":null,\"plant_id\":\"60\"}]', '[{\"equipment_name\":\"Bal001\",\"make\":\"\",\"capacity\":\"0.00\",\"equipment_code\":\"002\"}]', '[{\"make\":\"\",\"category\":\"Fix\",\"capacity\":\"0.00\",\"equipment_name\":\"equ1\"}]', '[{\"id\":\"10\",\"user_no\":\"gmpdemo1\",\"glassware_no\":\"G10001\",\"name\":\"test\",\"capacity\":\"3.00\",\"unit\":\"ml\",\"glassware_class\":\"type A\",\"description\":\"test\",\"make\":\"\",\"gst\":\"12.00\",\"hsn\":\"4244\",\"status\":\"pending\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 05:42:24\",\"approve_by\":\"\",\"approve_date\":null,\"plant_id\":\"60\"}]', '[]', '[[\"a+b=c\"]]', '', 'Method of Analysis / Standard Test Procedure', '', '', '[]', '[]', '', 'master', '2023-08-31 03:36:54', '[]', '[]'),
(380, 893, 893, '[]', '[{\"equipment_name\":\"Bal02\",\"make\":\"99\",\"capacity\":\"0.00\",\"equipment_code\":\"003\"}]', '[{\"make\":\"\",\"category\":\"Fix\",\"capacity\":\"0.00\",\"equipment_name\":\"Samp equ.\"}]', '[{\"id\":\"10\",\"user_no\":\"gmpdemo1\",\"glassware_no\":\"G10001\",\"name\":\"test\",\"capacity\":\"3.00\",\"unit\":\"ml\",\"glassware_class\":\"type A\",\"description\":\"test\",\"make\":\"\",\"gst\":\"12.00\",\"hsn\":\"4244\",\"status\":\"pending\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 05:42:24\",\"approve_by\":\"\",\"approve_date\":null,\"plant_id\":\"60\"}]', '[]', '[[\"a+b=c\"]]', '', 'Method of Analysis / Standard Test Procedure', '', '', '[]', '[]', '', 'master', '2023-08-31 03:37:24', '[]', '[]'),
(381, 894, 894, '[{\"id\":\"262\",\"user_no\":\"gmpdemo1\",\"chemical_no\":\"C-0262\",\"chemical_name\":\"Ethanol Absolute Anhydrous\",\"molecular_wt\":\"46.08\",\"pack_size\":\"0.00\",\"cas_name\":\"64-17-5\",\"grade\":\"AR\",\"make\":[],\"unit\":\"\",\"gst\":\"0.00\",\"hsn\":\"\",\"status\":\"approve\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02\",\"approve_by\":\"\",\"approve_date\":null,\"plant_id\":\"60\"}]', '[{\"equipment_name\":\"Bal02\",\"make\":\"99\",\"capacity\":\"0.00\",\"equipment_code\":\"003\"}]', '[{\"make\":\"\",\"category\":\"Fix\",\"capacity\":\"0.00\",\"equipment_name\":\"Samp equ.\"}]', '[{\"id\":\"10\",\"user_no\":\"gmpdemo1\",\"glassware_no\":\"G10001\",\"name\":\"test\",\"capacity\":\"3.00\",\"unit\":\"ml\",\"glassware_class\":\"type A\",\"description\":\"test\",\"make\":\"\",\"gst\":\"12.00\",\"hsn\":\"4244\",\"status\":\"pending\",\"entry_by\":\"master\",\"entry_date\":\"2023-08-02 05:42:24\",\"approve_by\":\"\",\"approve_date\":null,\"plant_id\":\"60\"}]', '[]', '[[\"a+b=c\"]]', '', 'Method of Analysis / Standard Test Procedure', '', '', '[]', '[]', '', 'master', '2023-08-31 03:37:58', '[]', '[]');

-- --------------------------------------------------------

--
-- Table structure for table `test_type`
--

CREATE TABLE `test_type` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `thermic_operation`
--

CREATE TABLE `thermic_operation` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pressure_inlet` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pressure_outlet` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `temp_inlet` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `temp_outlet` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stack_temp` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `entry_time` time NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `therotical_test`
--

CREATE TABLE `therotical_test` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `test_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `test_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `activity_description` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `questions` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `tn_employees`
--

CREATE TABLE `tn_employees` (
  `id` int NOT NULL,
  `plant_id` varchar(20) NOT NULL,
  `user_no` varchar(20) NOT NULL DEFAULT 'gmpdemo1',
  `tn_no` int NOT NULL,
  `emp_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `attendance` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `exam` varchar(20) NOT NULL DEFAULT 'pending',
  `marks` decimal(10,2) NOT NULL,
  `result` varchar(20) NOT NULL,
  `feedback` text NOT NULL,
  `questions` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `toilet_bathroom`
--

CREATE TABLE `toilet_bathroom` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `date` date NOT NULL,
  `time` time(6) NOT NULL,
  `staff` varchar(50) NOT NULL,
  `director` varchar(50) NOT NULL,
  `ladies` varchar(50) NOT NULL,
  `worker` varchar(50) NOT NULL,
  `done_by` varchar(50) NOT NULL,
  `checked_by` varchar(50) NOT NULL,
  `remark` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `tools`
--

CREATE TABLE `tools` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tooling_type` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `punch_dia` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `die_dia` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `punch_length` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `size` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `training_feedback`
--

CREATE TABLE `training_feedback` (
  `id` int NOT NULL,
  `plant_id` varchar(50) NOT NULL,
  `training_date` varchar(50) NOT NULL,
  `trainer` varchar(50) NOT NULL,
  `participants` varchar(50) NOT NULL,
  `feedback` varchar(600) NOT NULL,
  `training_id` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `training_needs`
--

CREATE TABLE `training_needs` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `department` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `subject` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `other_subject` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `reference_document` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `proposed_trainer` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `training_needs` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `proposed_date` date NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `trainer` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `training_date` date NOT NULL,
  `training_time` time NOT NULL,
  `venue` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `trainer_name` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime NOT NULL,
  `attendance` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `training_tools` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `training_start_time` time NOT NULL,
  `training_end_time` time NOT NULL,
  `questionaries` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `evaluator_name` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `duration` int NOT NULL,
  `marks` decimal(10,2) NOT NULL,
  `question` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `training_subject`
--

CREATE TABLE `training_subject` (
  `id` int NOT NULL,
  `plant_id` varchar(50) NOT NULL,
  `subject` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- --------------------------------------------------------

--
-- Table structure for table `transporter_bill`
--

CREATE TABLE `transporter_bill` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `transporter_bill_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `from_date` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `to_date` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vendor_name` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vehicle_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `km` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `file_bill` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `i_no1` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `transporter_management`
--

CREATE TABLE `transporter_management` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `transporter_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `company` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `person` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `address` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pincode` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `contact_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `email` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `transport_for` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `LglNm` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `state_code` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gst_type` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gst_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `Trdnm` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `country` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `transporter_management`
--
DELIMITER $$
CREATE TRIGGER `transporter_no_insert` BEFORE INSERT ON `transporter_management` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM transporter_management ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.transporter_id = concat('T1', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `transport_complaint`
--

CREATE TABLE `transport_complaint` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `comp_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `received_from` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `country` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `received_through` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `contact_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `transporter` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vehicle` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `other` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `deatils` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `comp_id1` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `transport_master`
--

CREATE TABLE `transport_master` (
  `id` int NOT NULL,
  `transport_company` varchar(50) NOT NULL,
  `isd_code` varchar(50) NOT NULL,
  `states` varchar(50) NOT NULL,
  `city` varchar(50) NOT NULL,
  `gst_type` varchar(50) NOT NULL,
  `gst_no` varchar(50) NOT NULL,
  `contact_person` varchar(50) NOT NULL,
  `country` varchar(50) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `plant_id` varchar(20) NOT NULL,
  `transport_type` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `unit`
--

CREATE TABLE `unit` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `unit_type` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `unit_code` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `description` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `unit`
--

INSERT INTO `unit` (`id`, `plant_id`, `user_no`, `unit_type`, `unit`, `status`, `entry_by`, `entry_date`, `unit_code`, `description`) VALUES
(78, '60', 'gmpdemo1', '', 'Kg', 'pending', 'master', '2023-08-02', '', ''),
(79, '60', 'gmpdemo1', '', 'gm', 'pending', 'master', '2023-08-02', '', ''),
(80, '60', 'gmpdemo1', '', 'ml', 'pending', 'master', '2023-08-02', '', '');

-- --------------------------------------------------------

--
-- Table structure for table `unitformula`
--

CREATE TABLE `unitformula` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `bom_type` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `master_formula_type` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfr_description` varchar(150) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfr_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `formula_for` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '1',
  `average_weight` decimal(10,2) NOT NULL,
  `raw_materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `packing_materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `additional_materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `instructions` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `abbreviation` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_size` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `bmr_checklist` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `version_no` varchar(5) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `checked_by` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checked_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `input_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `yield_qty` varchar(24) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dispatch_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stages` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `min_per` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `max_per` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `min_output_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `max_output_qty` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `drum_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_id` int NOT NULL,
  `pm_batch_size` int NOT NULL,
  `pm_pack_size` int NOT NULL,
  `pm_pack_unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `average_weight_unit` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_size_unit` int NOT NULL,
  `batch_size_uom` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dosage_form` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dose_unit_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `refmfr_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `shelf_life` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `ref_sample_batch_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `colour` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `body` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `list_customer` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `note` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `revison_history` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `unitformula`
--
DELIMITER $$
CREATE TRIGGER `mfr_no_insert` BEFORE INSERT ON `unitformula` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM unitformula ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.mfr_no = concat('MFR', LPAD(CONVERT(@lastID, CHAR), 3, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `unitformula_packing_materials`
--

CREATE TABLE `unitformula_packing_materials` (
  `id` int NOT NULL,
  `unit_formula_dtl_id` int NOT NULL,
  `material_subtype` varchar(50) NOT NULL,
  `material_name` varchar(150) NOT NULL,
  `qty` decimal(10,2) NOT NULL,
  `unit_name` varchar(25) NOT NULL,
  `overages` decimal(10,2) NOT NULL,
  `role` varchar(50) NOT NULL,
  `total_qty` decimal(10,2) NOT NULL,
  `material_code` varchar(25) NOT NULL,
  `grade` varchar(25) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `unitformula_pm_dtl`
--

CREATE TABLE `unitformula_pm_dtl` (
  `id` int NOT NULL,
  `unit_formula_id` int NOT NULL,
  `packing_formula_id` int NOT NULL,
  `market_type` varchar(25) NOT NULL,
  `country_specific` varchar(3) NOT NULL,
  `country_name` varchar(50) NOT NULL,
  `packing_type` varchar(25) NOT NULL,
  `pack_size` varchar(10) NOT NULL,
  `batch_size` varchar(10) NOT NULL,
  `unit` varchar(10) NOT NULL,
  `packing_materials` text NOT NULL,
  `entry_by` varchar(25) NOT NULL,
  `entry_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `unit_materials`
--

CREATE TABLE `unit_materials` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `mfr_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `material_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qty` decimal(10,2) NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `overages` decimal(10,2) NOT NULL,
  `role` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `process` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `yield_contributing` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `utensil_usage`
--

CREATE TABLE `utensil_usage` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `utensil_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cleaned_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cleaned_date` datetime NOT NULL,
  `check_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `uv_burning`
--

CREATE TABLE `uv_burning` (
  `id` int NOT NULL,
  `equipment_code` int NOT NULL,
  `pressure` varchar(50) NOT NULL,
  `burning_hr` varchar(50) NOT NULL,
  `cleaned_by` varchar(50) NOT NULL,
  `entry_by` varchar(50) NOT NULL,
  `entry_date` date NOT NULL,
  `entry_time` time NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `vechile_entry`
--

CREATE TABLE `vechile_entry` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `inentry_by` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `vechile_type` varchar(33) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vechile_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `visitor_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `driver_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `out_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `outentry_by` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `vehicle_management`
--

CREATE TABLE `vehicle_management` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `agent_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `end_date` date NOT NULL,
  `email_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vehicle_id` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vehicle_name` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vehicle_category` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vehicle_model` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `engine_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `chassis_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `registration_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `insurance_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `insurance_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `insurance_company` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `purpose_vehicle` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `colour` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vehicle_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `make_company` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vehicle_no` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `fuel_type` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `capacity` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `goods` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `passenger` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vendor_name` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `phone_no` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `i_no1` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `vendor`
--
DELIMITER $$
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.vendor_no = concat('V1', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `vendor1`
--

CREATE TABLE `vendor1` (
  `id` int NOT NULL,
  `plant_id` varchar(50) NOT NULL,
  `user_no` varchar(50) NOT NULL,
  `vendor_no` varchar(50) NOT NULL,
  `vendor_type` varchar(100) NOT NULL,
  `vendor_for` varchar(50) NOT NULL,
  `manufacturer_code` varchar(50) NOT NULL,
  `vendor_subtype` varchar(100) NOT NULL,
  `material_type` varchar(100) NOT NULL,
  `vendor_name` varchar(500) NOT NULL,
  `contact_person` varchar(300) NOT NULL,
  `contact_no` varchar(10) NOT NULL,
  `contact_email` varchar(50) NOT NULL,
  `comp_pan_no` varchar(10) NOT NULL,
  `unit_name` varchar(100) NOT NULL,
  `address` varchar(500) NOT NULL,
  `country` varchar(30) NOT NULL,
  `ocountry` varchar(30) NOT NULL,
  `permanent_state` varchar(60) NOT NULL,
  `city` varchar(50) NOT NULL,
  `pincode` varchar(6) NOT NULL,
  `mobile_no` varchar(10) NOT NULL,
  `email` varchar(70) NOT NULL,
  `gst_applicable` varchar(70) NOT NULL,
  `gst_registered` varchar(50) NOT NULL,
  `gst_type` varchar(60) NOT NULL,
  `gst_no` varchar(15) NOT NULL,
  `pan_no` varchar(30) NOT NULL,
  `c_unit_name` varchar(200) NOT NULL,
  `tel_no2` varchar(30) NOT NULL,
  `website` varchar(49) NOT NULL,
  `contact_number` varchar(40) NOT NULL,
  `fax` varchar(50) NOT NULL,
  `c_address` varchar(700) NOT NULL,
  `c_country` varchar(50) NOT NULL,
  `mfg_lic_file` varchar(40) NOT NULL,
  `mfi_lci_file` varchar(100) NOT NULL,
  `other_country` varchar(50) NOT NULL,
  `c_state` varchar(60) NOT NULL,
  `state_code` varchar(50) NOT NULL,
  `c_city` varchar(60) NOT NULL,
  `mfg_lic` varchar(40) NOT NULL,
  `c_pincode` varchar(6) NOT NULL,
  `gst_certificate` varchar(100) NOT NULL,
  `c_mobile_no` varchar(10) NOT NULL,
  `c_gst_applicable` varchar(12) NOT NULL,
  `c_gst_type` varchar(10) NOT NULL,
  `c_gst_no` varchar(15) NOT NULL,
  `state_name` varchar(100) NOT NULL,
  `status` varchar(10) NOT NULL,
  `vendor_status` varchar(50) NOT NULL,
  `entry_date` date NOT NULL,
  `entry_by` varchar(30) NOT NULL,
  `tel_no1` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `vendorquotation`
--

CREATE TABLE `vendorquotation` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `quotation_no` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `vendor_no` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `materials` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `documents` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `status` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `q_no1` int NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Triggers `vendorquotation`
--
DELIMITER $$
CREATE TRIGGER `quotation` BEFORE INSERT ON `vendorquotation` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM vendorquotation ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.quotation_no = concat('QO-', LPAD(CONVERT(@lastID, CHAR), 3, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `vendor_checklist`
--

CREATE TABLE `vendor_checklist` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checklist_No` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `version_no` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checklist_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `effective_date` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `status` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `preparechekclist` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checklist_point` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `special_require` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `uploadcheck` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `state_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `corporate` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `vendor_doc`
--

CREATE TABLE `vendor_doc` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `gst_certificate` varchar(60) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mfg_lic_file` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `company_certificate` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sme_reg` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `pan_card` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `dmf_reg` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ventfilter`
--

CREATE TABLE `ventfilter` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `category` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `plant_name` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `location` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `filter_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `housing` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `cartridge` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `micron` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `diameter` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `length` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `frequency` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'approve'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `ventfilter_replacement`
--

CREATE TABLE `ventfilter_replacement` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `filter_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `next_date` date NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `check_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `vessel_entry`
--

CREATE TABLE `vessel_entry` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `co` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `conditions` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `date` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `details_work` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `validity_from` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `validity_to` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `lel` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `location` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `o2` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `co_ppm` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `H2s_ppm` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department_from` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department_to` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `check_by` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `check_date` datetime NOT NULL,
  `approve_by` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime NOT NULL,
  `comment` varchar(22) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `volumetric_preparation`
--

CREATE TABLE `volumetric_preparation` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `material_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `solution_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `make` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `primary_standard` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `secondary_standard` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `standardization` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `details` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `mean` decimal(10,2) NOT NULL,
  `sd` decimal(10,2) NOT NULL,
  `rsd` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `volumetric_solution`
--

CREATE TABLE `volumetric_solution` (
  `id` int NOT NULL,
  `solution_no` varchar(50) NOT NULL,
  `user_no` varchar(20) NOT NULL DEFAULT 'gmpdemo1',
  `solution_name` varchar(200) NOT NULL,
  `percentage` decimal(10,2) NOT NULL,
  `unit` varchar(20) NOT NULL,
  `strength` varchar(100) NOT NULL,
  `standard_type` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `plant_id` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Triggers `volumetric_solution`
--
DELIMITER $$
CREATE TRIGGER `solution_no_insert` BEFORE INSERT ON `volumetric_solution` FOR EACH ROW BEGIN

SET @lastID = (SELECT id FROM volumetric_solution ORDER BY id DESC LIMIT 1);
IF @lastID IS NULL OR @lastID = '' THEN
    SET @lastID = 0;
END IF;
SET @lastID = @lastID +1;
SET NEW.solution_no = concat('VS', LPAD(CONVERT(@lastID, CHAR), 4, '0'));
END
$$
DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `vouchev`
--

CREATE TABLE `vouchev` (
  `id` int NOT NULL,
  `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `vr_no` int NOT NULL,
  `vr_type` varchar(11) NOT NULL,
  `credit` float DEFAULT NULL,
  `debit` float NOT NULL,
  `created_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `status` bit(10) NOT NULL,
  `narration` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Stand-in structure for view `vw_stock_details`
-- (See below for the actual view)
--
CREATE TABLE `vw_stock_details` (
`ar_no` varchar(30)
,`batch_no` varchar(20)
,`grn_no` varchar(100)
,`issued_for` varchar(10)
,`issued_Qty` double
,`material_code` varchar(100)
,`plant_id` varchar(20)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `vw_stock_summary`
-- (See below for the actual view)
--
CREATE TABLE `vw_stock_summary` (
`balance_qty` double
,`category` varchar(50)
,`grade` varchar(50)
,`issue_qty` double
,`material_code` varchar(100)
,`material_name` varchar(100)
,`material_subtype` varchar(100)
,`material_type` varchar(100)
,`plant_id` varchar(20)
,`received_qty` decimal(32,2)
,`unit` varchar(100)
);

-- --------------------------------------------------------

--
-- Table structure for table `washWater`
--

CREATE TABLE `washWater` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `equipment_code` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `product_code` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `clean_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_by` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `status` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `result` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `remark` varchar(60) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_collect_by` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sample_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `water_investigation`
--

CREATE TABLE `water_investigation` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `emreport_no` varchar(25) NOT NULL,
  `intimation_date` date NOT NULL,
  `sampling_point` varchar(25) NOT NULL,
  `batch_no` varchar(25) NOT NULL,
  `description` varchar(500) NOT NULL,
  `given_by` varchar(25) NOT NULL,
  `issue_by` varchar(25) NOT NULL,
  `status` varchar(25) NOT NULL,
  `close_date` date NOT NULL,
  `remark` int NOT NULL,
  `entry_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `water_point`
--

CREATE TABLE `water_point` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `point_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `point_name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `water_type` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `frequency` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `day` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tests` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `testing_type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `section` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `allocation` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `allocated_to` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `allocated_on` date NOT NULL,
  `microbiology_qty` int NOT NULL,
  `chemical_qty` int NOT NULL,
  `unit` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_no` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_by` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `sampling_date` date NOT NULL,
  `sampling_status` varchar(15) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `water_specification`
--

CREATE TABLE `water_specification` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `water_type` varchar(100) NOT NULL,
  `grade` varchar(100) NOT NULL,
  `version_no` int NOT NULL,
  `supersede_no` int NOT NULL,
  `storage` varchar(100) NOT NULL,
  `review_date` date NOT NULL,
  `sample_qty` int NOT NULL,
  `tests` varchar(100) NOT NULL,
  `revisions` varchar(100) NOT NULL,
  `entry_by` varchar(100) NOT NULL,
  `entry_date` date NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'pending'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `water_tank`
--

CREATE TABLE `water_tank` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `tank_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `tank_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `capacity` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `location` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `moc` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `type` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `format_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `frequency` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `previous_date` date NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'approve',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` datetime NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `weekly_off`
--

CREATE TABLE `weekly_off` (
  `id` int NOT NULL,
  `plant_id` varchar(10) NOT NULL,
  `weeklly_off_day` varchar(20) NOT NULL,
  `entry_date` date NOT NULL,
  `entry_by` varchar(20) NOT NULL,
  `department` varchar(30) NOT NULL,
  `designation` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `weight_check`
--

CREATE TABLE `weight_check` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `department` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `activity` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `bmr_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `batch_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `stage` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `checkpoints` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'PENDING',
  `entry_by` varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `entry_time` time NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `workorder`
--

CREATE TABLE `workorder` (
  `id` int NOT NULL,
  `plant_id` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `user_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'gmpdemo1',
  `workorder_no` varchar(6) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `order_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `order_from` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `client_code` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `po_type` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `po_no` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `po_date` date NOT NULL,
  `valid_till` date NOT NULL,
  `product_code` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `generic_name` text CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `qty` decimal(10,2) NOT NULL,
  `unit` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `status` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `entry_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `entry_date` date NOT NULL,
  `approve_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `approve_date` datetime DEFAULT NULL,
  `plan` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'pending',
  `plan_by` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
  `plan_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `work_order_batch_lots`
--

CREATE TABLE `work_order_batch_lots` (
  `id` int NOT NULL,
  `plant_id` int NOT NULL,
  `work_order_id` int NOT NULL,
  `lot_no` varchar(25) NOT NULL,
  `lot_type` varchar(25) NOT NULL,
  `material_code` varchar(25) NOT NULL,
  `batch_qty` decimal(10,2) NOT NULL,
  `status` varchar(10) NOT NULL DEFAULT 'pending',
  `dispense_recd_status` varchar(25) NOT NULL,
  `entry_by` varchar(25) NOT NULL,
  `entry_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `checked_by` varchar(15) NOT NULL,
  `checked_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `z_forms`
--

CREATE TABLE `z_forms` (
  `id` int NOT NULL,
  `sop_title` varchar(100) NOT NULL,
  `sop_for` varchar(100) NOT NULL,
  `version_no` int NOT NULL,
  `upload_sop` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Structure for view `master_material`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `master_material`  AS SELECT `a`.`plant_id` AS `plant_id`, `a`.`id` AS `id`, `a`.`material_type` AS `material_type`, `a`.`material_subtype` AS `material_subtype`, `a`.`material_nature` AS `material_nature`, `a`.`material_sub_type_id` AS `material_sub_type_id`, `a`.`material_code` AS `material_code`, `a`.`material_name` AS `material_name`, `a`.`hsn` AS `hsn`, `a`.`gst_id` AS `gst_id`, `a`.`status` AS `status`, `a`.`testing_required` AS `testing_required`, `c`.`igst` AS `gst_percent`, `a`.`grade` AS `grade`, `a`.`unit` AS `unit` FROM ((select `a`.`plant_id` AS `plant_id`,`a`.`id` AS `id`,`a`.`material_type` AS `material_type`,`a`.`material_subtype` AS `material_subtype`,`a`.`material_nature` AS `material_nature`,`a`.`material_sub_type_id` AS `material_sub_type_id`,`a`.`material_code` AS `material_code`,`a`.`material_name` AS `material_name`,`a`.`hsn` AS `hsn`,`a`.`gst_id` AS `gst_id`,`a`.`status` AS `status`,`b`.`testing_required` AS `testing_required`,`a`.`grade` AS `grade`,`a`.`unit` AS `unit` from (`material` `a` left join `material_type` `b` on(((`a`.`material_subtype` = `b`.`material_type`) and (`a`.`plant_id` = `b`.`plant_id`)))) union all select `a`.`plant_id` AS `plant_id`,`a`.`id` AS `id`,`b`.`material_type` AS `material_type`,`b`.`material_subtype` AS `material_subtype`,'' AS `material_nature`,`a`.`material_sub_type_id` AS `material_sub_type_id`,`a`.`material_code` AS `material_code`,`a`.`material_name` AS `material_name`,`a`.`hsn` AS `hsn`,`a`.`gst_id` AS `gst_id`,`a`.`status` AS `status`,'' AS `testing_required`,'' AS `grade`,`a`.`unit` AS `unit` from (`general_material` `a` left join `material_type` `b` on(((`a`.`material_subtype` = `b`.`material_type`) and (`a`.`plant_id` = `b`.`plant_id`))))) `a` left join `gst_per` `c` on(((`a`.`gst_id` = `c`.`id`) and (`a`.`plant_id` = `c`.`plant_id`))))union all select `a`.`plant_id` AS `plant_id`,`a`.`id` AS `id`,'Services' AS `material_type`,`a`.`service_type` AS `material_subtype`,'' AS `material_nature`,`a`.`id` AS `material_sub_type_id`,`a`.`service_code` AS `material_code`,`a`.`service_desp` AS `material_name`,`a`.`sac_code` AS `hsn`,0 AS `gst_id`,`a`.`status` AS `status`,'' AS `testing_required`,`a`.`gst_per` AS `gst_percent`,'' AS `grade`,'' AS `unit` from `service` `a` union all select `a`.`plant_id` AS `plant_id`,`a`.`id` AS `id`,'Finish Product' AS `material_type`,`a`.`product_type` AS `material_subtype`,`a`.`product_nature` AS `material_nature`,`a`.`id` AS `material_sub_type_id`,`a`.`product_code` AS `material_code`,concat(`a`.`product_name`,'-',`a`.`grade`) AS `material_name`,`a`.`hsn` AS `hsn`,0 AS `gst_id`,`a`.`status` AS `status`,'' AS `testing_required`,`a`.`gst` AS `gst_percent`,'' AS `grade`,`a`.`unit` AS `unit` from `product` `a` union all select `a`.`plant_id` AS `plant_id`,`a`.`id` AS `id`,'Chemical Material' AS `material_type`,'Chemical Material' AS `material_subtype`,'' AS `material_nature`,`a`.`id` AS `material_sub_type_id`,`a`.`chemical_no` AS `material_code`,`a`.`chemical_name` AS `material_name`,`a`.`hsn` AS `hsn`,0 AS `gst_id`,`a`.`status` AS `status`,'' AS `testing_required`,`a`.`gst` AS `gst_percent`,'' AS `grade`,`a`.`unit` AS `unit` from `chemical` `a` union all select `a`.`plant_id` AS `plant_id`,`a`.`id` AS `id`,'Glassware Material' AS `material_type`,'Glassware Material' AS `material_subtype`,'' AS `material_nature`,`a`.`id` AS `material_sub_type_id`,`a`.`glassware_no` AS `material_code`,`a`.`name` AS `material_name`,`a`.`hsn` AS `hsn`,0 AS `gst_id`,`a`.`status` AS `status`,'' AS `testing_required`,`a`.`gst` AS `gst_percent`,'' AS `grade`,`a`.`unit` AS `unit` from `glassware` `a`  ;

-- --------------------------------------------------------

--
-- Structure for view `master_material_bkp`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `master_material_bkp`  AS SELECT `a`.`plant_id` AS `plant_id`, `a`.`id` AS `id`, `a`.`material_type` AS `material_type`, `a`.`material_subtype` AS `material_subtype`, `a`.`material_nature` AS `material_nature`, `a`.`material_sub_type_id` AS `material_sub_type_id`, `a`.`material_code` AS `material_code`, `a`.`material_name` AS `material_name`, `a`.`hsn` AS `hsn`, `a`.`gst_id` AS `gst_id`, `a`.`status` AS `status`, `a`.`testing_required` AS `testing_required`, `c`.`igst` AS `gst_percent` FROM ((select `a`.`plant_id` AS `plant_id`,`a`.`id` AS `id`,`b`.`material_type` AS `material_type`,`b`.`material_subtype` AS `material_subtype`,`a`.`material_nature` AS `material_nature`,`a`.`material_sub_type_id` AS `material_sub_type_id`,`a`.`material_code` AS `material_code`,`a`.`material_name` AS `material_name`,`a`.`hsn` AS `hsn`,`a`.`gst_id` AS `gst_id`,`a`.`status` AS `status`,`b`.`testing_required` AS `testing_required` from (`material` `a` left join `material_type` `b` on((`a`.`material_sub_type_id` = `b`.`id`))) union all select `a`.`plant_id` AS `plant_id`,`a`.`id` AS `id`,`b`.`material_type` AS `material_type`,`b`.`material_subtype` AS `material_subtype`,'' AS `material_nature`,`a`.`material_sub_type_id` AS `material_sub_type_id`,`a`.`material_code` AS `material_code`,`a`.`material_name` AS `material_name`,`a`.`hsn` AS `hsn`,`a`.`gst_id` AS `gst_id`,`a`.`status` AS `status`,'' AS `testing_required` from (`general_material` `a` left join `material_type` `b` on((`a`.`material_sub_type_id` = `b`.`id`)))) `a` left join `gst_per` `c` on((`a`.`gst_id` = `c`.`id`))) ;

-- --------------------------------------------------------

--
-- Structure for view `quotation_rates_by_product`
--

-- --------------------------------------------------------

--
-- Structure for view `stock_view`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `stock_view`  AS SELECT `s`.`id` AS `stock_id`, `cm`.`challan_no` AS `challan_no`, `c`.`challan_date` AS `challan_date`, `cm`.`receiving_no` AS `receiving_no`, `cm`.`receiving_date` AS `receiving_date`, `cm`.`received_qty` AS `received_qty`, `cm`.`receiving` AS `receving_status`, `cm`.`grn` AS `grn_status`, `s`.`grn_no` AS `grn_no`, `s`.`ar_no` AS `ar_no`, `sp`.`sampling_no` AS `sampling_id`, `sp`.`sample_status` AS `sampling_status`, `t`.`testing_no` AS `testing_id`, `t`.`status` AS `testing_status`, `s`.`qty` AS `qty_after_sampling` FROM (((((`stock_book` `s` left join `challan_materials` `cm` on((`s`.`grn_no` = `cm`.`grn_no`))) left join `sampling` `sp` on((`cm`.`grn_no` = `sp`.`grn_no`))) left join `sampling_batches` `sb` on((`sp`.`grn_no` = `sb`.`grn_no`))) left join `testing` `t` on((`sb`.`grn_no` = `t`.`grn_no`))) left join `challan` `c` on((`cm`.`challan_no` = `c`.`challan_no`))) ;

-- --------------------------------------------------------

--
-- Structure for view `vw_stock_details`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `vw_stock_details`  AS SELECT `a`.`plant_id` AS `plant_id`, `a`.`issued_for` AS `issued_for`, `a`.`material_code` AS `material_code`, `a`.`ar_no` AS `ar_no`, `a`.`grn_no` AS `grn_no`, `a`.`batch_no` AS `batch_no`, ifnull(sum(`a`.`issued_Qty`),0) AS `issued_Qty` FROM (select `a`.`plant_id` AS `plant_id`,'Dispensing' AS `issued_for`,`a`.`material_code` AS `material_code`,`a`.`ar_no` AS `ar_no`,`a`.`grn_no` AS `grn_no`,`a`.`batch_no` AS `batch_no`,ifnull(`a`.`qty`,0) AS `issued_Qty` from `material_issue` `a` union all select `a`.`plant_id` AS `plant_id`,'Sampling' AS `issued_for`,`a`.`material_code` AS `material_code`,`a`.`ar_no` AS `ar_no`,`a`.`grn_no` AS `grn_no`,`a`.`batch_no` AS `batch_no`,ifnull(sum(`a`.`undertest_qty`),0) AS `issued_Qty` from `sampling` `a` group by `a`.`plant_id`,`a`.`material_code`,`a`.`ar_no`,`a`.`grn_no`,`a`.`entry_date`,`a`.`batch_no`) AS `a` GROUP BY `a`.`plant_id`, `a`.`issued_for`, `a`.`material_code`, `a`.`ar_no`, `a`.`grn_no`, `a`.`batch_no` ORDER BY `a`.`plant_id` DESC ;

-- --------------------------------------------------------

--
-- Structure for view `vw_stock_summary`
--

--
-- Indexes for dumped tables
--

--
-- Indexes for table `achievement`
--
ALTER TABLE `achievement`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `activity`
--
ALTER TABLE `activity`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `activity_cleaning`
--
ALTER TABLE `activity_cleaning`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ac_category`
--
ALTER TABLE `ac_category`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ac_ledger_master`
--
ALTER TABLE `ac_ledger_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ac_leger_groups`
--
ALTER TABLE `ac_leger_groups`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `additional_charges`
--
ALTER TABLE `additional_charges`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `additional_material`
--
ALTER TABLE `additional_material`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `additional_material_hdr`
--
ALTER TABLE `additional_material_hdr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `additional_requisition`
--
ALTER TABLE `additional_requisition`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `additional_term`
--
ALTER TABLE `additional_term`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `addresses`
--
ALTER TABLE `addresses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `agenda_data`
--
ALTER TABLE `agenda_data`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `agenda_dates`
--
ALTER TABLE `agenda_dates`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `agenda_product`
--
ALTER TABLE `agenda_product`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `agenda_teams`
--
ALTER TABLE `agenda_teams`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `agenda_vendor`
--
ALTER TABLE `agenda_vendor`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `agent`
--
ALTER TABLE `agent`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `agreement_details`
--
ALTER TABLE `agreement_details`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `agreement_partner`
--
ALTER TABLE `agreement_partner`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ahu_usages`
--
ALTER TABLE `ahu_usages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `aircompressor_filterreplce`
--
ALTER TABLE `aircompressor_filterreplce`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `aircompressor_operation`
--
ALTER TABLE `aircompressor_operation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `aircompressor_pressure`
--
ALTER TABLE `aircompressor_pressure`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `airtesting`
--
ALTER TABLE `airtesting`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `appraisal_checklist_choices`
--
ALTER TABLE `appraisal_checklist_choices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `checklist_detail_id` (`checklist_detail_id`);

--
-- Indexes for table `appraisal_checklist_details`
--
ALTER TABLE `appraisal_checklist_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `checklist_master_id` (`checklist_master_id`);

--
-- Indexes for table `appraisal_checklist_dtl`
--
ALTER TABLE `appraisal_checklist_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `appraisal_checklist_feedback`
--
ALTER TABLE `appraisal_checklist_feedback`
  ADD PRIMARY KEY (`id`),
  ADD KEY `checklist_master_id` (`checklist_master_id`),
  ADD KEY `checklist_detail_id` (`checklist_detail_id`);

--
-- Indexes for table `appraisal_checklist_hdr`
--
ALTER TABLE `appraisal_checklist_hdr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `appraisal_checklist_master`
--
ALTER TABLE `appraisal_checklist_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `appraisal_goal_settings`
--
ALTER TABLE `appraisal_goal_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `appraisal_initiate`
--
ALTER TABLE `appraisal_initiate`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `appron_testing`
--
ALTER TABLE `appron_testing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `area`
--
ALTER TABLE `area`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `arealist`
--
ALTER TABLE `arealist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `artwork`
--
ALTER TABLE `artwork`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `artwork_file`
--
ALTER TABLE `artwork_file`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `assessment_questions`
--
ALTER TABLE `assessment_questions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `asset_issued`
--
ALTER TABLE `asset_issued`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `attendence`
--
ALTER TABLE `attendence`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `audit_dates`
--
ALTER TABLE `audit_dates`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `audit_trail`
--
ALTER TABLE `audit_trail`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `authorization`
--
ALTER TABLE `authorization`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `autoclave`
--
ALTER TABLE `autoclave`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bactorial`
--
ALTER TABLE `bactorial`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `balance_calibration`
--
ALTER TABLE `balance_calibration`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `banks`
--
ALTER TABLE `banks`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch`
--
ALTER TABLE `batch`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batchformula`
--
ALTER TABLE `batchformula`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_checklist`
--
ALTER TABLE `batch_checklist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_formula`
--
ALTER TABLE `batch_formula`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_formula_info`
--
ALTER TABLE `batch_formula_info`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_materials`
--
ALTER TABLE `batch_materials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_no`
--
ALTER TABLE `batch_no`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_planing_raw_material_hdr`
--
ALTER TABLE `batch_planing_raw_material_hdr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_planning`
--
ALTER TABLE `batch_planning`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_planning_materials`
--
ALTER TABLE `batch_planning_materials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_release`
--
ALTER TABLE `batch_release`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_stages`
--
ALTER TABLE `batch_stages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `batch_stages_ipqc_dtl`
--
ALTER TABLE `batch_stages_ipqc_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `blister`
--
ALTER TABLE `blister`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bmr`
--
ALTER TABLE `bmr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bmr_material`
--
ALTER TABLE `bmr_material`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bmr_materials`
--
ALTER TABLE `bmr_materials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bmr_packing`
--
ALTER TABLE `bmr_packing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bmr_plan`
--
ALTER TABLE `bmr_plan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bmr_stages`
--
ALTER TABLE `bmr_stages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bmr_tailing`
--
ALTER TABLE `bmr_tailing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bmr_work`
--
ALTER TABLE `bmr_work`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bod_cleaning`
--
ALTER TABLE `bod_cleaning`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bpr`
--
ALTER TABLE `bpr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `brine_plant`
--
ALTER TABLE `brine_plant`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bulkdensity`
--
ALTER TABLE `bulkdensity`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cabin_passage`
--
ALTER TABLE `cabin_passage`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `calibration`
--
ALTER TABLE `calibration`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `candidate`
--
ALTER TABLE `candidate`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `canteen_office`
--
ALTER TABLE `canteen_office`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `capa`
--
ALTER TABLE `capa`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `capa_comment`
--
ALTER TABLE `capa_comment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `capa_file`
--
ALTER TABLE `capa_file`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ccpermanant`
--
ALTER TABLE `ccpermanant`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ccpermanant_files`
--
ALTER TABLE `ccpermanant_files`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ccpermanant_final_qa_change_action`
--
ALTER TABLE `ccpermanant_final_qa_change_action`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ccpermanant_regulatoy`
--
ALTER TABLE `ccpermanant_regulatoy`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ccp_departments`
--
ALTER TABLE `ccp_departments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cctemporary`
--
ALTER TABLE `cctemporary`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cctemporary_files`
--
ALTER TABLE `cctemporary_files`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cc_departments`
--
ALTER TABLE `cc_departments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cc_department_review`
--
ALTER TABLE `cc_department_review`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `challan`
--
ALTER TABLE `challan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `challan_materials`
--
ALTER TABLE `challan_materials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `changecontrol`
--
ALTER TABLE `changecontrol`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `change_action`
--
ALTER TABLE `change_action`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `change_comments`
--
ALTER TABLE `change_comments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `chat_message`
--
ALTER TABLE `chat_message`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `checklist`
--
ALTER TABLE `checklist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `checklist_master`
--
ALTER TABLE `checklist_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `checklist_transaction`
--
ALTER TABLE `checklist_transaction`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `check_list`
--
ALTER TABLE `check_list`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `chemical`
--
ALTER TABLE `chemical`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `chemical_indend`
--
ALTER TABLE `chemical_indend`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `chem_manufaturer`
--
ALTER TABLE `chem_manufaturer`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `city`
--
ALTER TABLE `city`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `client_document`
--
ALTER TABLE `client_document`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `client_feedback`
--
ALTER TABLE `client_feedback`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `client_quotation`
--
ALTER TABLE `client_quotation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `colony`
--
ALTER TABLE `colony`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `colony_calibration`
--
ALTER TABLE `colony_calibration`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `color`
--
ALTER TABLE `color`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `color1`
--
ALTER TABLE `color1`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `company_unit`
--
ALTER TABLE `company_unit`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `complaint`
--
ALTER TABLE `complaint`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `complaint_action`
--
ALTER TABLE `complaint_action`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `component_master`
--
ALTER TABLE `component_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `consoladated`
--
ALTER TABLE `consoladated`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `container`
--
ALTER TABLE `container`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `contractor_bill`
--
ALTER TABLE `contractor_bill`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `controlsample_rack`
--
ALTER TABLE `controlsample_rack`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `controlsample_review`
--
ALTER TABLE `controlsample_review`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `control_sample`
--
ALTER TABLE `control_sample`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `costing`
--
ALTER TABLE `costing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `country`
--
ALTER TABLE `country`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `critiera_master`
--
ALTER TABLE `critiera_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `culture`
--
ALTER TABLE `culture`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `culture_identification`
--
ALTER TABLE `culture_identification`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `daikin_chilling`
--
ALTER TABLE `daikin_chilling`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `daily_training`
--
ALTER TABLE `daily_training`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `department`
--
ALTER TABLE `department`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `department_review`
--
ALTER TABLE `department_review`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deprt_formname`
--
ALTER TABLE `deprt_formname`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `designation`
--
ALTER TABLE `designation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `destruction`
--
ALTER TABLE `destruction`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deviation`
--
ALTER TABLE `deviation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deviation_comments`
--
ALTER TABLE `deviation_comments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `deviation_files`
--
ALTER TABLE `deviation_files`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dinamic_pass_box`
--
ALTER TABLE `dinamic_pass_box`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `disinfectant_solution`
--
ALTER TABLE `disinfectant_solution`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `disinfect_solution`
--
ALTER TABLE `disinfect_solution`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dispatch`
--
ALTER TABLE `dispatch`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dispensing`
--
ALTER TABLE `dispensing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dispensing_details_hdr`
--
ALTER TABLE `dispensing_details_hdr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dispensing_materials`
--
ALTER TABLE `dispensing_materials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `division`
--
ALTER TABLE `division`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `document`
--
ALTER TABLE `document`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `document_index`
--
ALTER TABLE `document_index`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `document_requisition_log`
--
ALTER TABLE `document_requisition_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `document_training`
--
ALTER TABLE `document_training`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `doc_management`
--
ALTER TABLE `doc_management`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dosage_form`
--
ALTER TABLE `dosage_form`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dose_units`
--
ALTER TABLE `dose_units`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dossier_dmf`
--
ALTER TABLE `dossier_dmf`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dossier_entry`
--
ALTER TABLE `dossier_entry`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `earthing_points`
--
ALTER TABLE `earthing_points`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `edits`
--
ALTER TABLE `edits`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `electric_operation`
--
ALTER TABLE `electric_operation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `employee1`
--
ALTER TABLE `employee1`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `employee_agreement`
--
ALTER TABLE `employee_agreement`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `emp_document`
--
ALTER TABLE `emp_document`
  ADD PRIMARY KEY (`did`);

--
-- Indexes for table `emp_rights`
--
ALTER TABLE `emp_rights`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `emp_rights_dtl`
--
ALTER TABLE `emp_rights_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `emp_salary_details`
--
ALTER TABLE `emp_salary_details`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `em_investigation`
--
ALTER TABLE `em_investigation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `engi_stock`
--
ALTER TABLE `engi_stock`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `enquiry`
--
ALTER TABLE `enquiry`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `enquiry_actions`
--
ALTER TABLE `enquiry_actions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Environment`
--
ALTER TABLE `Environment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `environment`
--
ALTER TABLE `environment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `environment_check`
--
ALTER TABLE `environment_check`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `env_isolate`
--
ALTER TABLE `env_isolate`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `equipment`
--
ALTER TABLE `equipment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `equipments1`
--
ALTER TABLE `equipments1`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `equipment_cleaning`
--
ALTER TABLE `equipment_cleaning`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `equipment_maintenance`
--
ALTER TABLE `equipment_maintenance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `equipment_names`
--
ALTER TABLE `equipment_names`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `equipment_requirement`
--
ALTER TABLE `equipment_requirement`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `equipment_usages`
--
ALTER TABLE `equipment_usages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `etp_inprocess`
--
ALTER TABLE `etp_inprocess`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `euipment_prevent_checklist_dtl`
--
ALTER TABLE `euipment_prevent_checklist_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `euipment_prevent_checklist_hdr`
--
ALTER TABLE `euipment_prevent_checklist_hdr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `excavation`
--
ALTER TABLE `excavation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `expense`
--
ALTER TABLE `expense`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `expense_categories`
--
ALTER TABLE `expense_categories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `externaltrainer`
--
ALTER TABLE `externaltrainer`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `trainer_name` (`trainer_name`);

--
-- Indexes for table `factory_primises`
--
ALTER TABLE `factory_primises`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fg_stock_book`
--
ALTER TABLE `fg_stock_book`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `finish_indend`
--
ALTER TABLE `finish_indend`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `finish_product`
--
ALTER TABLE `finish_product`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fire_extinguisher`
--
ALTER TABLE `fire_extinguisher`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fisrt_aid`
--
ALTER TABLE `fisrt_aid`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `fogging`
--
ALTER TABLE `fogging`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `formulas`
--
ALTER TABLE `formulas`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `frequency_master`
--
ALTER TABLE `frequency_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gardan_plant`
--
ALTER TABLE `gardan_plant`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gardan_resource`
--
ALTER TABLE `gardan_resource`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gatepass`
--
ALTER TABLE `gatepass`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gaussmeter_test`
--
ALTER TABLE `gaussmeter_test`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `general_material`
--
ALTER TABLE `general_material`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `general_primises`
--
ALTER TABLE `general_primises`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `glassware`
--
ALTER TABLE `glassware`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `glassware_cleaning`
--
ALTER TABLE `glassware_cleaning`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gmp_monitoring_checklist`
--
ALTER TABLE `gmp_monitoring_checklist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gmp_monitoring_checkpoints`
--
ALTER TABLE `gmp_monitoring_checkpoints`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `govagency`
--
ALTER TABLE `govagency`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `grade`
--
ALTER TABLE `grade`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `gst_per`
--
ALTER TABLE `gst_per`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `gst` (`gst`);

--
-- Indexes for table `hdpe_cleaning`
--
ALTER TABLE `hdpe_cleaning`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hot_water`
--
ALTER TABLE `hot_water`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `housekeeping_management`
--
ALTER TABLE `housekeeping_management`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hplc`
--
ALTER TABLE `hplc`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hygine`
--
ALTER TABLE `hygine`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `incident`
--
ALTER TABLE `incident`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `incident_comments`
--
ALTER TABLE `incident_comments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `incident_files`
--
ALTER TABLE `incident_files`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `incoming_courier`
--
ALTER TABLE `incoming_courier`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `incubator_bod_usage`
--
ALTER TABLE `incubator_bod_usage`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `incubator_usage`
--
ALTER TABLE `incubator_usage`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `indend_chemical`
--
ALTER TABLE `indend_chemical`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `indend_equipment`
--
ALTER TABLE `indend_equipment`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `indend_general`
--
ALTER TABLE `indend_general`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `indend_glassware`
--
ALTER TABLE `indend_glassware`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `indend_packing`
--
ALTER TABLE `indend_packing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `indend_raw`
--
ALTER TABLE `indend_raw`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `indicator`
--
ALTER TABLE `indicator`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `induction`
--
ALTER TABLE `induction`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ini_mfr`
--
ALTER TABLE `ini_mfr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `inprocess_check`
--
ALTER TABLE `inprocess_check`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `inprocess_sampling`
--
ALTER TABLE `inprocess_sampling`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `inspection_plan`
--
ALTER TABLE `inspection_plan`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `instructions`
--
ALTER TABLE `instructions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `instruments`
--
ALTER TABLE `instruments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `interviewers`
--
ALTER TABLE `interviewers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `investigation_report`
--
ALTER TABLE `investigation_report`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `invoice_entry`
--
ALTER TABLE `invoice_entry`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `invoice_entry_history`
--
ALTER TABLE `invoice_entry_history`
  ADD PRIMARY KEY (`tid`);

--
-- Indexes for table `ipqc_spec`
--
ALTER TABLE `ipqc_spec`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `issuance`
--
ALTER TABLE `issuance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `issuance_material`
--
ALTER TABLE `issuance_material`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `jobwork`
--
ALTER TABLE `jobwork`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `joiningreport`
--
ALTER TABLE `joiningreport`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `journal_vouch`
--
ALTER TABLE `journal_vouch`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ju_drk`
--
ALTER TABLE `ju_drk`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `key_master`
--
ALTER TABLE `key_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `kilosker_chilling`
--
ALTER TABLE `kilosker_chilling`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `label`
--
ALTER TABLE `label`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `labels`
--
ALTER TABLE `labels`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `labour`
--
ALTER TABLE `labour`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `labour_attendance`
--
ALTER TABLE `labour_attendance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `labour_contractor`
--
ALTER TABLE `labour_contractor`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `labour_daily_work`
--
ALTER TABLE `labour_daily_work`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `labour_data`
--
ALTER TABLE `labour_data`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `labour_management`
--
ALTER TABLE `labour_management`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `labs`
--
ALTER TABLE `labs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `lab_cleaning`
--
ALTER TABLE `lab_cleaning`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `laf`
--
ALTER TABLE `laf`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `laundry`
--
ALTER TABLE `laundry`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `leadunit`
--
ALTER TABLE `leadunit`
  ADD PRIMARY KEY (`uid`);

--
-- Indexes for table `leaveform`
--
ALTER TABLE `leaveform`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `leave_application`
--
ALTER TABLE `leave_application`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `leave_card`
--
ALTER TABLE `leave_card`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `leave_types`
--
ALTER TABLE `leave_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ledger`
--
ALTER TABLE `ledger`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `letter`
--
ALTER TABLE `letter`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `lineclearance`
--
ALTER TABLE `lineclearance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `liquid_media`
--
ALTER TABLE `liquid_media`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `location`
--
ALTER TABLE `location`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `luxmeter_monitoring`
--
ALTER TABLE `luxmeter_monitoring`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `maintenance`
--
ALTER TABLE `maintenance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `manpower`
--
ALTER TABLE `manpower`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `manual_fg_entry`
--
ALTER TABLE `manual_fg_entry`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `manufacturing_process`
--
ALTER TABLE `manufacturing_process`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `manufacturing_process_step`
--
ALTER TABLE `manufacturing_process_step`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `marketing_advice`
--
ALTER TABLE `marketing_advice`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `market_complaint`
--
ALTER TABLE `market_complaint`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `massage`
--
ALTER TABLE `massage`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `masterformula`
--
ALTER TABLE `masterformula`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `MRF_no` (`mfr_no`);

--
-- Indexes for table `masters`
--
ALTER TABLE `masters`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `master_checklist`
--
ALTER TABLE `master_checklist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `master_culture`
--
ALTER TABLE `master_culture`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `master_fg_types`
--
ALTER TABLE `master_fg_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `master_index`
--
ALTER TABLE `master_index`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `master_media`
--
ALTER TABLE `master_media`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `material_issue`
--
ALTER TABLE `material_issue`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `material_type`
--
ALTER TABLE `material_type`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `media`
--
ALTER TABLE `media`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `media_consumption`
--
ALTER TABLE `media_consumption`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `media_decontamination`
--
ALTER TABLE `media_decontamination`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `media_prepartion`
--
ALTER TABLE `media_prepartion`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `media_stock`
--
ALTER TABLE `media_stock`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `medicalcheckup`
--
ALTER TABLE `medicalcheckup`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mfg_work_order_dtl`
--
ALTER TABLE `mfg_work_order_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mfg_work_order_hdr`
--
ALTER TABLE `mfg_work_order_hdr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mfr`
--
ALTER TABLE `mfr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mgmt_meeting`
--
ALTER TABLE `mgmt_meeting`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `microbiology_documents`
--
ALTER TABLE `microbiology_documents`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `micro_laf_pressurediff`
--
ALTER TABLE `micro_laf_pressurediff`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `micro_pressure`
--
ALTER TABLE `micro_pressure`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `micro_spec_test`
--
ALTER TABLE `micro_spec_test`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `micro_test`
--
ALTER TABLE `micro_test`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `micr_laf_log`
--
ALTER TABLE `micr_laf_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `moa_procdeatil`
--
ALTER TABLE `moa_procdeatil`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mrp`
--
ALTER TABLE `mrp`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mst_batch_checklist`
--
ALTER TABLE `mst_batch_checklist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mst_chlist_dtl`
--
ALTER TABLE `mst_chlist_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mst_documentData`
--
ALTER TABLE `mst_documentData`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mst_holidays`
--
ALTER TABLE `mst_holidays`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mst_shift`
--
ALTER TABLE `mst_shift`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `mst_vendor_materials`
--
ALTER TABLE `mst_vendor_materials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `need_training`
--
ALTER TABLE `need_training`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `Non_registration`
--
ALTER TABLE `Non_registration`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `onjob_training`
--
ALTER TABLE `onjob_training`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `oos`
--
ALTER TABLE `oos`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `oos_questions`
--
ALTER TABLE `oos_questions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `oos_tests`
--
ALTER TABLE `oos_tests`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `order_materials`
--
ALTER TABLE `order_materials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `outdoor_duty`
--
ALTER TABLE `outdoor_duty`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `outgoing_courier`
--
ALTER TABLE `outgoing_courier`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `outword`
--
ALTER TABLE `outword`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packing`
--
ALTER TABLE `packing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packing_batch_stages_ipqc_dtl`
--
ALTER TABLE `packing_batch_stages_ipqc_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packing_category`
--
ALTER TABLE `packing_category`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `category` (`category`);

--
-- Indexes for table `packing_manufacturing_process`
--
ALTER TABLE `packing_manufacturing_process`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packing_stage`
--
ALTER TABLE `packing_stage`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packing_stages_ipqc_dtl`
--
ALTER TABLE `packing_stages_ipqc_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packing_stage_master`
--
ALTER TABLE `packing_stage_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packing_stage_type`
--
ALTER TABLE `packing_stage_type`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packing_style`
--
ALTER TABLE `packing_style`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `packsize`
--
ALTER TABLE `packsize`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pack_size`
--
ALTER TABLE `pack_size`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pending_document`
--
ALTER TABLE `pending_document`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `plant`
--
ALTER TABLE `plant`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `plant_name` (`plant_name`);

--
-- Indexes for table `po_entry`
--
ALTER TABLE `po_entry`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `po_material`
--
ALTER TABLE `po_material`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `premises_preventive`
--
ALTER TABLE `premises_preventive`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pressure`
--
ALTER TABLE `pressure`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pressure_master`
--
ALTER TABLE `pressure_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pressure_plenum`
--
ALTER TABLE `pressure_plenum`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `product`
--
ALTER TABLE `product`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `production_report`
--
ALTER TABLE `production_report`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `product_commercial_info`
--
ALTER TABLE `product_commercial_info`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `product_dev`
--
ALTER TABLE `product_dev`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `product_mrp`
--
ALTER TABLE `product_mrp`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `product_other_information_api`
--
ALTER TABLE `product_other_information_api`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `product_id` (`product_id`);

--
-- Indexes for table `product_recall`
--
ALTER TABLE `product_recall`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `prod_dev_request`
--
ALTER TABLE `prod_dev_request`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `purchaseorder`
--
ALTER TABLE `purchaseorder`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `qa_master`
--
ALTER TABLE `qa_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `qa_tn_employees`
--
ALTER TABLE `qa_tn_employees`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `qa_training_needs`
--
ALTER TABLE `qa_training_needs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `qc_testing_results`
--
ALTER TABLE `qc_testing_results`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `qms_training`
--
ALTER TABLE `qms_training`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `qualification`
--
ALTER TABLE `qualification`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `qualification` (`qualification`);

--
-- Indexes for table `qualification_request`
--
ALTER TABLE `qualification_request`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quotation`
--
ALTER TABLE `quotation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quotation_dtl`
--
ALTER TABLE `quotation_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quotation_hdr`
--
ALTER TABLE `quotation_hdr`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rack`
--
ALTER TABLE `rack`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ratemrp`
--
ALTER TABLE `ratemrp`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `raw_material`
--
ALTER TABLE `raw_material`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `raw_materials_table`
--
ALTER TABLE `raw_materials_table`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `receving`
--
ALTER TABLE `receving`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `refregirator_temp_record`
--
ALTER TABLE `refregirator_temp_record`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `refrigerator_cleaning`
--
ALTER TABLE `refrigerator_cleaning`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `refrigerator_log`
--
ALTER TABLE `refrigerator_log`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rejection_destruction`
--
ALTER TABLE `rejection_destruction`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rejection_online`
--
ALTER TABLE `rejection_online`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rejection_rawpacking`
--
ALTER TABLE `rejection_rawpacking`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `requisition`
--
ALTER TABLE `requisition`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `resignation`
--
ALTER TABLE `resignation`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `emp_id` (`emp_id`);

--
-- Indexes for table `resignation_clearnace`
--
ALTER TABLE `resignation_clearnace`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `retest`
--
ALTER TABLE `retest`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `retraining`
--
ALTER TABLE `retraining`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rinse_analysis`
--
ALTER TABLE `rinse_analysis`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rinse_analysis_dtl`
--
ALTER TABLE `rinse_analysis_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `risk_departments`
--
ALTER TABLE `risk_departments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `risk_identification`
--
ALTER TABLE `risk_identification`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_chemical`
--
ALTER TABLE `rnd_chemical`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `chemical_name` (`chemical_name`);

--
-- Indexes for table `rnd_controlsample_rack`
--
ALTER TABLE `rnd_controlsample_rack`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_control_sample`
--
ALTER TABLE `rnd_control_sample`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_dev_optimisation`
--
ALTER TABLE `rnd_dev_optimisation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_dev_trial`
--
ALTER TABLE `rnd_dev_trial`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_dev_trials`
--
ALTER TABLE `rnd_dev_trials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_equipment`
--
ALTER TABLE `rnd_equipment`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `equipment_code` (`equipment_code`) USING BTREE;

--
-- Indexes for table `rnd_glassware`
--
ALTER TABLE `rnd_glassware`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_hplc`
--
ALTER TABLE `rnd_hplc`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_indicator`
--
ALTER TABLE `rnd_indicator`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_material`
--
ALTER TABLE `rnd_material`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `material_code` (`material_code`);

--
-- Indexes for table `rnd_optimisation_trials`
--
ALTER TABLE `rnd_optimisation_trials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_predev`
--
ALTER TABLE `rnd_predev`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_product`
--
ALTER TABLE `rnd_product`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `product_code` (`product_code`);

--
-- Indexes for table `rnd_risk_departments`
--
ALTER TABLE `rnd_risk_departments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_risk_identification`
--
ALTER TABLE `rnd_risk_identification`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_techtransfer`
--
ALTER TABLE `rnd_techtransfer`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `rnd_volumetric_master`
--
ALTER TABLE `rnd_volumetric_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `salary_annexure`
--
ALTER TABLE `salary_annexure`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `salary_annexure_details`
--
ALTER TABLE `salary_annexure_details`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `salary_head`
--
ALTER TABLE `salary_head`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `salary_head_details`
--
ALTER TABLE `salary_head_details`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `salary_types`
--
ALTER TABLE `salary_types`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sales`
--
ALTER TABLE `sales`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `salesmrp`
--
ALTER TABLE `salesmrp`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sales_product`
--
ALTER TABLE `sales_product`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sales_product_dtl`
--
ALTER TABLE `sales_product_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sample_request`
--
ALTER TABLE `sample_request`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sample_withdrawal`
--
ALTER TABLE `sample_withdrawal`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sampling`
--
ALTER TABLE `sampling`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `samplingfg`
--
ALTER TABLE `samplingfg`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sampling_batches`
--
ALTER TABLE `sampling_batches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `score`
--
ALTER TABLE `score`
  ADD PRIMARY KEY (`playerid`);

--
-- Indexes for table `section`
--
ALTER TABLE `section`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `section_name` (`section_name`),
  ADD UNIQUE KEY `section_code` (`section_code`);

--
-- Indexes for table `security_round`
--
ALTER TABLE `security_round`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `send_checklist`
--
ALTER TABLE `send_checklist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `service`
--
ALTER TABLE `service`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `shelf`
--
ALTER TABLE `shelf`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `shelf_life`
--
ALTER TABLE `shelf_life`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `shift`
--
ALTER TABLE `shift`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `shift_allocation`
--
ALTER TABLE `shift_allocation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `shift_schedule`
--
ALTER TABLE `shift_schedule`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `shortages`
--
ALTER TABLE `shortages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `software_customization`
--
ALTER TABLE `software_customization`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `software_restriction`
--
ALTER TABLE `software_restriction`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `solid_media`
--
ALTER TABLE `solid_media`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sopinitiation`
--
ALTER TABLE `sopinitiation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sops`
--
ALTER TABLE `sops`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sop_details`
--
ALTER TABLE `sop_details`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sop_distribution`
--
ALTER TABLE `sop_distribution`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sop_gen`
--
ALTER TABLE `sop_gen`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sop_no` (`sop_no`),
  ADD UNIQUE KEY `file` (`file`);

--
-- Indexes for table `sop_generate`
--
ALTER TABLE `sop_generate`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sop_generate_drafts`
--
ALTER TABLE `sop_generate_drafts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sop_revision`
--
ALTER TABLE `sop_revision`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sop_training`
--
ALTER TABLE `sop_training`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `special_grade`
--
ALTER TABLE `special_grade`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `specification`
--
ALTER TABLE `specification`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `specification_no` (`specification_no`);

--
-- Indexes for table `spec_revision`
--
ALTER TABLE `spec_revision`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `spec_tests`
--
ALTER TABLE `spec_tests`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `spillage`
--
ALTER TABLE `spillage`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stability_batch`
--
ALTER TABLE `stability_batch`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stability_chember`
--
ALTER TABLE `stability_chember`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stability_study`
--
ALTER TABLE `stability_study`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stability_testing`
--
ALTER TABLE `stability_testing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stagemaster`
--
ALTER TABLE `stagemaster`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stages`
--
ALTER TABLE `stages`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stages_ipqc`
--
ALTER TABLE `stages_ipqc`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stages_ipqc_dtl`
--
ALTER TABLE `stages_ipqc_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `standard_master`
--
ALTER TABLE `standard_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `state`
--
ALTER TABLE `state`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `state_master`
--
ALTER TABLE `state_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stationary_management`
--
ALTER TABLE `stationary_management`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `std_weight`
--
ALTER TABLE `std_weight`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `steam_operation`
--
ALTER TABLE `steam_operation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stereo`
--
ALTER TABLE `stereo`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stereo_dist`
--
ALTER TABLE `stereo_dist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stereo_distruction`
--
ALTER TABLE `stereo_distruction`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `stock_book`
--
ALTER TABLE `stock_book`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `storage_condition`
--
ALTER TABLE `storage_condition`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `storage_condition` (`storage_condition`);

--
-- Indexes for table `storage_conditions`
--
ALTER TABLE `storage_conditions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `subcategory`
--
ALTER TABLE `subcategory`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `subtest`
--
ALTER TABLE `subtest`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uq_subtest` (`test_type`,`test`,`subtest`);

--
-- Indexes for table `swab_analysis`
--
ALTER TABLE `swab_analysis`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `task`
--
ALTER TABLE `task`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tax_invoice`
--
ALTER TABLE `tax_invoice`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tax_invoice_product`
--
ALTER TABLE `tax_invoice_product`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `technical_info`
--
ALTER TABLE `technical_info`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `temperature`
--
ALTER TABLE `temperature`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `temp_refrigerator`
--
ALTER TABLE `temp_refrigerator`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `terms`
--
ALTER TABLE `terms`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `test`
--
ALTER TABLE `test`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `test` (`test`);

--
-- Indexes for table `testing`
--
ALTER TABLE `testing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `testing_tests`
--
ALTER TABLE `testing_tests`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `test_methods`
--
ALTER TABLE `test_methods`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `thermic_operation`
--
ALTER TABLE `thermic_operation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `therotical_test`
--
ALTER TABLE `therotical_test`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tn_employees`
--
ALTER TABLE `tn_employees`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `toilet_bathroom`
--
ALTER TABLE `toilet_bathroom`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `tools`
--
ALTER TABLE `tools`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `training_feedback`
--
ALTER TABLE `training_feedback`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `training_needs`
--
ALTER TABLE `training_needs`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `training_subject`
--
ALTER TABLE `training_subject`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `transporter_bill`
--
ALTER TABLE `transporter_bill`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `transporter_management`
--
ALTER TABLE `transporter_management`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `transport_complaint`
--
ALTER TABLE `transport_complaint`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `transport_master`
--
ALTER TABLE `transport_master`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `unit`
--
ALTER TABLE `unit`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `unitformula`
--
ALTER TABLE `unitformula`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `unitformula_packing_materials`
--
ALTER TABLE `unitformula_packing_materials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `unitformula_pm_dtl`
--
ALTER TABLE `unitformula_pm_dtl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `unit_materials`
--
ALTER TABLE `unit_materials`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `utensil_usage`
--
ALTER TABLE `utensil_usage`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `uv_burning`
--
ALTER TABLE `uv_burning`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `vechile_entry`
--
ALTER TABLE `vechile_entry`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `vehicle_management`
--
ALTER TABLE `vehicle_management`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `vendor1`
--
ALTER TABLE `vendor1`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `vendorquotation`
--
ALTER TABLE `vendorquotation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `vendor_checklist`
--
ALTER TABLE `vendor_checklist`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `vendor_doc`
--
ALTER TABLE `vendor_doc`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ventfilter`
--
ALTER TABLE `ventfilter`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `ventfilter_replacement`
--
ALTER TABLE `ventfilter_replacement`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `vessel_entry`
--
ALTER TABLE `vessel_entry`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `volumetric_preparation`
--
ALTER TABLE `volumetric_preparation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `volumetric_solution`
--
ALTER TABLE `volumetric_solution`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `vouchev`
--
ALTER TABLE `vouchev`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `washWater`
--
ALTER TABLE `washWater`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `water_investigation`
--
ALTER TABLE `water_investigation`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `water_point`
--
ALTER TABLE `water_point`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `water_specification`
--
ALTER TABLE `water_specification`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `water_tank`
--
ALTER TABLE `water_tank`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `weekly_off`
--
ALTER TABLE `weekly_off`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `weight_check`
--
ALTER TABLE `weight_check`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `workorder`
--
ALTER TABLE `workorder`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `work_order_batch_lots`
--
ALTER TABLE `work_order_batch_lots`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `z_forms`
--
ALTER TABLE `z_forms`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `achievement`
--
ALTER TABLE `achievement`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT for table `activity`
--
ALTER TABLE `activity`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=210;

--
-- AUTO_INCREMENT for table `activity_cleaning`
--
ALTER TABLE `activity_cleaning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ac_category`
--
ALTER TABLE `ac_category`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ac_ledger_master`
--
ALTER TABLE `ac_ledger_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ac_leger_groups`
--
ALTER TABLE `ac_leger_groups`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `additional_charges`
--
ALTER TABLE `additional_charges`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `additional_material`
--
ALTER TABLE `additional_material`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `additional_material_hdr`
--
ALTER TABLE `additional_material_hdr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `additional_requisition`
--
ALTER TABLE `additional_requisition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `additional_term`
--
ALTER TABLE `additional_term`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `addresses`
--
ALTER TABLE `addresses`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `agenda_data`
--
ALTER TABLE `agenda_data`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `agenda_dates`
--
ALTER TABLE `agenda_dates`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `agenda_product`
--
ALTER TABLE `agenda_product`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `agenda_teams`
--
ALTER TABLE `agenda_teams`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `agenda_vendor`
--
ALTER TABLE `agenda_vendor`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `agent`
--
ALTER TABLE `agent`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `agreement_details`
--
ALTER TABLE `agreement_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `agreement_partner`
--
ALTER TABLE `agreement_partner`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ahu_usages`
--
ALTER TABLE `ahu_usages`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `aircompressor_filterreplce`
--
ALTER TABLE `aircompressor_filterreplce`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `aircompressor_operation`
--
ALTER TABLE `aircompressor_operation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `aircompressor_pressure`
--
ALTER TABLE `aircompressor_pressure`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `airtesting`
--
ALTER TABLE `airtesting`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `appraisal_checklist_choices`
--
ALTER TABLE `appraisal_checklist_choices`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `appraisal_checklist_details`
--
ALTER TABLE `appraisal_checklist_details`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `appraisal_checklist_dtl`
--
ALTER TABLE `appraisal_checklist_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `appraisal_checklist_feedback`
--
ALTER TABLE `appraisal_checklist_feedback`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `appraisal_checklist_hdr`
--
ALTER TABLE `appraisal_checklist_hdr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `appraisal_checklist_master`
--
ALTER TABLE `appraisal_checklist_master`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `appraisal_goal_settings`
--
ALTER TABLE `appraisal_goal_settings`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `appraisal_initiate`
--
ALTER TABLE `appraisal_initiate`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `appron_testing`
--
ALTER TABLE `appron_testing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `area`
--
ALTER TABLE `area`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `arealist`
--
ALTER TABLE `arealist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `artwork`
--
ALTER TABLE `artwork`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `artwork_file`
--
ALTER TABLE `artwork_file`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `assessment_questions`
--
ALTER TABLE `assessment_questions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `asset_issued`
--
ALTER TABLE `asset_issued`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `attendence`
--
ALTER TABLE `attendence`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=346;

--
-- AUTO_INCREMENT for table `audit_dates`
--
ALTER TABLE `audit_dates`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `audit_trail`
--
ALTER TABLE `audit_trail`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `authorization`
--
ALTER TABLE `authorization`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `autoclave`
--
ALTER TABLE `autoclave`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bactorial`
--
ALTER TABLE `bactorial`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `balance_calibration`
--
ALTER TABLE `balance_calibration`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `banks`
--
ALTER TABLE `banks`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `batch`
--
ALTER TABLE `batch`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `batchformula`
--
ALTER TABLE `batchformula`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `batch_checklist`
--
ALTER TABLE `batch_checklist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `batch_formula`
--
ALTER TABLE `batch_formula`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `batch_formula_info`
--
ALTER TABLE `batch_formula_info`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=123;

--
-- AUTO_INCREMENT for table `batch_materials`
--
ALTER TABLE `batch_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=137;

--
-- AUTO_INCREMENT for table `batch_no`
--
ALTER TABLE `batch_no`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `batch_planing_raw_material_hdr`
--
ALTER TABLE `batch_planing_raw_material_hdr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=154;

--
-- AUTO_INCREMENT for table `batch_planning`
--
ALTER TABLE `batch_planning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=119;

--
-- AUTO_INCREMENT for table `batch_planning_materials`
--
ALTER TABLE `batch_planning_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=676;

--
-- AUTO_INCREMENT for table `batch_release`
--
ALTER TABLE `batch_release`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `batch_stages`
--
ALTER TABLE `batch_stages`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `batch_stages_ipqc_dtl`
--
ALTER TABLE `batch_stages_ipqc_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `blister`
--
ALTER TABLE `blister`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `bmr`
--
ALTER TABLE `bmr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bmr_material`
--
ALTER TABLE `bmr_material`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bmr_materials`
--
ALTER TABLE `bmr_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bmr_packing`
--
ALTER TABLE `bmr_packing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bmr_plan`
--
ALTER TABLE `bmr_plan`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bmr_stages`
--
ALTER TABLE `bmr_stages`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bmr_tailing`
--
ALTER TABLE `bmr_tailing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bmr_work`
--
ALTER TABLE `bmr_work`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bod_cleaning`
--
ALTER TABLE `bod_cleaning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bpr`
--
ALTER TABLE `bpr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `brine_plant`
--
ALTER TABLE `brine_plant`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bulkdensity`
--
ALTER TABLE `bulkdensity`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cabin_passage`
--
ALTER TABLE `cabin_passage`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `calibration`
--
ALTER TABLE `calibration`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=41;

--
-- AUTO_INCREMENT for table `candidate`
--
ALTER TABLE `candidate`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77;

--
-- AUTO_INCREMENT for table `canteen_office`
--
ALTER TABLE `canteen_office`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `capa`
--
ALTER TABLE `capa`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `capa_comment`
--
ALTER TABLE `capa_comment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `capa_file`
--
ALTER TABLE `capa_file`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ccpermanant`
--
ALTER TABLE `ccpermanant`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=69;

--
-- AUTO_INCREMENT for table `ccpermanant_files`
--
ALTER TABLE `ccpermanant_files`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `ccpermanant_final_qa_change_action`
--
ALTER TABLE `ccpermanant_final_qa_change_action`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT for table `ccpermanant_regulatoy`
--
ALTER TABLE `ccpermanant_regulatoy`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `ccp_departments`
--
ALTER TABLE `ccp_departments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `cctemporary`
--
ALTER TABLE `cctemporary`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `cctemporary_files`
--
ALTER TABLE `cctemporary_files`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `cc_departments`
--
ALTER TABLE `cc_departments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `cc_department_review`
--
ALTER TABLE `cc_department_review`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=80;

--
-- AUTO_INCREMENT for table `challan`
--
ALTER TABLE `challan`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=619;

--
-- AUTO_INCREMENT for table `challan_materials`
--
ALTER TABLE `challan_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=528;

--
-- AUTO_INCREMENT for table `changecontrol`
--
ALTER TABLE `changecontrol`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;

--
-- AUTO_INCREMENT for table `change_action`
--
ALTER TABLE `change_action`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `change_comments`
--
ALTER TABLE `change_comments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT for table `chat_message`
--
ALTER TABLE `chat_message`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `checklist`
--
ALTER TABLE `checklist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `checklist_master`
--
ALTER TABLE `checklist_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `checklist_transaction`
--
ALTER TABLE `checklist_transaction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6157;

--
-- AUTO_INCREMENT for table `check_list`
--
ALTER TABLE `check_list`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `chemical`
--
ALTER TABLE `chemical`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=263;

--
-- AUTO_INCREMENT for table `chemical_indend`
--
ALTER TABLE `chemical_indend`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `chem_manufaturer`
--
ALTER TABLE `chem_manufaturer`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `city`
--
ALTER TABLE `city`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `client_document`
--
ALTER TABLE `client_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `client_feedback`
--
ALTER TABLE `client_feedback`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `client_quotation`
--
ALTER TABLE `client_quotation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `colony`
--
ALTER TABLE `colony`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `color`
--
ALTER TABLE `color`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `color1`
--
ALTER TABLE `color1`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `company_unit`
--
ALTER TABLE `company_unit`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `complaint`
--
ALTER TABLE `complaint`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `complaint_action`
--
ALTER TABLE `complaint_action`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `component_master`
--
ALTER TABLE `component_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `consoladated`
--
ALTER TABLE `consoladated`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `container`
--
ALTER TABLE `container`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `contractor_bill`
--
ALTER TABLE `contractor_bill`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `controlsample_rack`
--
ALTER TABLE `controlsample_rack`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `controlsample_review`
--
ALTER TABLE `controlsample_review`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `control_sample`
--
ALTER TABLE `control_sample`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `costing`
--
ALTER TABLE `costing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `country`
--
ALTER TABLE `country`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `critiera_master`
--
ALTER TABLE `critiera_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `culture`
--
ALTER TABLE `culture`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `culture_identification`
--
ALTER TABLE `culture_identification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `daikin_chilling`
--
ALTER TABLE `daikin_chilling`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `daily_training`
--
ALTER TABLE `daily_training`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `department`
--
ALTER TABLE `department`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;

--
-- AUTO_INCREMENT for table `department_review`
--
ALTER TABLE `department_review`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deprt_formname`
--
ALTER TABLE `deprt_formname`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=115;

--
-- AUTO_INCREMENT for table `designation`
--
ALTER TABLE `designation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=89;

--
-- AUTO_INCREMENT for table `destruction`
--
ALTER TABLE `destruction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `deviation`
--
ALTER TABLE `deviation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=73;

--
-- AUTO_INCREMENT for table `deviation_comments`
--
ALTER TABLE `deviation_comments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `deviation_files`
--
ALTER TABLE `deviation_files`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;

--
-- AUTO_INCREMENT for table `dinamic_pass_box`
--
ALTER TABLE `dinamic_pass_box`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `disinfectant_solution`
--
ALTER TABLE `disinfectant_solution`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `disinfect_solution`
--
ALTER TABLE `disinfect_solution`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dispatch`
--
ALTER TABLE `dispatch`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dispensing`
--
ALTER TABLE `dispensing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dispensing_details_hdr`
--
ALTER TABLE `dispensing_details_hdr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=93;

--
-- AUTO_INCREMENT for table `dispensing_materials`
--
ALTER TABLE `dispensing_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `division`
--
ALTER TABLE `division`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `document`
--
ALTER TABLE `document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `document_index`
--
ALTER TABLE `document_index`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `document_requisition_log`
--
ALTER TABLE `document_requisition_log`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `document_training`
--
ALTER TABLE `document_training`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `doc_management`
--
ALTER TABLE `doc_management`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dosage_form`
--
ALTER TABLE `dosage_form`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `dose_units`
--
ALTER TABLE `dose_units`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `dossier_dmf`
--
ALTER TABLE `dossier_dmf`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `dossier_entry`
--
ALTER TABLE `dossier_entry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `earthing_points`
--
ALTER TABLE `earthing_points`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `edits`
--
ALTER TABLE `edits`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `electric_operation`
--
ALTER TABLE `electric_operation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employee1`
--
ALTER TABLE `employee1`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employee_agreement`
--
ALTER TABLE `employee_agreement`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `emp_document`
--
ALTER TABLE `emp_document`
  MODIFY `did` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `emp_rights`
--
ALTER TABLE `emp_rights`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;

--
-- AUTO_INCREMENT for table `emp_rights_dtl`
--
ALTER TABLE `emp_rights_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `emp_salary_details`
--
ALTER TABLE `emp_salary_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=110;

--
-- AUTO_INCREMENT for table `em_investigation`
--
ALTER TABLE `em_investigation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `engi_stock`
--
ALTER TABLE `engi_stock`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `enquiry`
--
ALTER TABLE `enquiry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `enquiry_actions`
--
ALTER TABLE `enquiry_actions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `Environment`
--
ALTER TABLE `Environment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `environment`
--
ALTER TABLE `environment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `environment_check`
--
ALTER TABLE `environment_check`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `env_isolate`
--
ALTER TABLE `env_isolate`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `equipment`
--
ALTER TABLE `equipment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=74;

--
-- AUTO_INCREMENT for table `equipments1`
--
ALTER TABLE `equipments1`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `equipment_cleaning`
--
ALTER TABLE `equipment_cleaning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `equipment_maintenance`
--
ALTER TABLE `equipment_maintenance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=731;

--
-- AUTO_INCREMENT for table `equipment_names`
--
ALTER TABLE `equipment_names`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `equipment_requirement`
--
ALTER TABLE `equipment_requirement`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `equipment_usages`
--
ALTER TABLE `equipment_usages`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `etp_inprocess`
--
ALTER TABLE `etp_inprocess`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `euipment_prevent_checklist_dtl`
--
ALTER TABLE `euipment_prevent_checklist_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `euipment_prevent_checklist_hdr`
--
ALTER TABLE `euipment_prevent_checklist_hdr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `excavation`
--
ALTER TABLE `excavation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `expense`
--
ALTER TABLE `expense`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `expense_categories`
--
ALTER TABLE `expense_categories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `externaltrainer`
--
ALTER TABLE `externaltrainer`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `factory_primises`
--
ALTER TABLE `factory_primises`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `fg_stock_book`
--
ALTER TABLE `fg_stock_book`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `finish_indend`
--
ALTER TABLE `finish_indend`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `finish_product`
--
ALTER TABLE `finish_product`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `fire_extinguisher`
--
ALTER TABLE `fire_extinguisher`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `fisrt_aid`
--
ALTER TABLE `fisrt_aid`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `fogging`
--
ALTER TABLE `fogging`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `formulas`
--
ALTER TABLE `formulas`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `frequency_master`
--
ALTER TABLE `frequency_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `gardan_plant`
--
ALTER TABLE `gardan_plant`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `gardan_resource`
--
ALTER TABLE `gardan_resource`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `gatepass`
--
ALTER TABLE `gatepass`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=268;

--
-- AUTO_INCREMENT for table `gaussmeter_test`
--
ALTER TABLE `gaussmeter_test`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `general_material`
--
ALTER TABLE `general_material`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=91;

--
-- AUTO_INCREMENT for table `general_primises`
--
ALTER TABLE `general_primises`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `glassware`
--
ALTER TABLE `glassware`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `glassware_cleaning`
--
ALTER TABLE `glassware_cleaning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `gmp_monitoring_checklist`
--
ALTER TABLE `gmp_monitoring_checklist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `gmp_monitoring_checkpoints`
--
ALTER TABLE `gmp_monitoring_checkpoints`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `govagency`
--
ALTER TABLE `govagency`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `grade`
--
ALTER TABLE `grade`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=84;

--
-- AUTO_INCREMENT for table `gst_per`
--
ALTER TABLE `gst_per`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=120;

--
-- AUTO_INCREMENT for table `hdpe_cleaning`
--
ALTER TABLE `hdpe_cleaning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `hot_water`
--
ALTER TABLE `hot_water`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `housekeeping_management`
--
ALTER TABLE `housekeeping_management`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `hplc`
--
ALTER TABLE `hplc`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `hygine`
--
ALTER TABLE `hygine`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `incident`
--
ALTER TABLE `incident`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `incident_comments`
--
ALTER TABLE `incident_comments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `incident_files`
--
ALTER TABLE `incident_files`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `incoming_courier`
--
ALTER TABLE `incoming_courier`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `incubator_bod_usage`
--
ALTER TABLE `incubator_bod_usage`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `incubator_usage`
--
ALTER TABLE `incubator_usage`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `indend_chemical`
--
ALTER TABLE `indend_chemical`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `indend_equipment`
--
ALTER TABLE `indend_equipment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `indend_general`
--
ALTER TABLE `indend_general`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `indend_glassware`
--
ALTER TABLE `indend_glassware`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `indend_packing`
--
ALTER TABLE `indend_packing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `indend_raw`
--
ALTER TABLE `indend_raw`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=521;

--
-- AUTO_INCREMENT for table `indicator`
--
ALTER TABLE `indicator`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `induction`
--
ALTER TABLE `induction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `ini_mfr`
--
ALTER TABLE `ini_mfr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inprocess_check`
--
ALTER TABLE `inprocess_check`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inprocess_sampling`
--
ALTER TABLE `inprocess_sampling`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `inspection_plan`
--
ALTER TABLE `inspection_plan`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `instructions`
--
ALTER TABLE `instructions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `instruments`
--
ALTER TABLE `instruments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `interviewers`
--
ALTER TABLE `interviewers`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=104;

--
-- AUTO_INCREMENT for table `investigation_report`
--
ALTER TABLE `investigation_report`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `invoice_entry`
--
ALTER TABLE `invoice_entry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=432;

--
-- AUTO_INCREMENT for table `invoice_entry_history`
--
ALTER TABLE `invoice_entry_history`
  MODIFY `tid` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `ipqc_spec`
--
ALTER TABLE `ipqc_spec`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `issuance`
--
ALTER TABLE `issuance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `issuance_material`
--
ALTER TABLE `issuance_material`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `jobwork`
--
ALTER TABLE `jobwork`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `joiningreport`
--
ALTER TABLE `joiningreport`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `journal_vouch`
--
ALTER TABLE `journal_vouch`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ju_drk`
--
ALTER TABLE `ju_drk`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `key_master`
--
ALTER TABLE `key_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `kilosker_chilling`
--
ALTER TABLE `kilosker_chilling`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `label`
--
ALTER TABLE `label`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=382;

--
-- AUTO_INCREMENT for table `labels`
--
ALTER TABLE `labels`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `labour`
--
ALTER TABLE `labour`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `labour_attendance`
--
ALTER TABLE `labour_attendance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;

--
-- AUTO_INCREMENT for table `labour_contractor`
--
ALTER TABLE `labour_contractor`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `labour_daily_work`
--
ALTER TABLE `labour_daily_work`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `labour_data`
--
ALTER TABLE `labour_data`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `labour_management`
--
ALTER TABLE `labour_management`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `labs`
--
ALTER TABLE `labs`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `lab_cleaning`
--
ALTER TABLE `lab_cleaning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `laf`
--
ALTER TABLE `laf`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `laundry`
--
ALTER TABLE `laundry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `leadunit`
--
ALTER TABLE `leadunit`
  MODIFY `uid` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `leaveform`
--
ALTER TABLE `leaveform`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `leave_application`
--
ALTER TABLE `leave_application`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `leave_card`
--
ALTER TABLE `leave_card`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `leave_types`
--
ALTER TABLE `leave_types`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `ledger`
--
ALTER TABLE `ledger`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `letter`
--
ALTER TABLE `letter`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `lineclearance`
--
ALTER TABLE `lineclearance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=84;

--
-- AUTO_INCREMENT for table `liquid_media`
--
ALTER TABLE `liquid_media`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `location`
--
ALTER TABLE `location`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `luxmeter_monitoring`
--
ALTER TABLE `luxmeter_monitoring`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `maintenance`
--
ALTER TABLE `maintenance`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `manpower`
--
ALTER TABLE `manpower`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=85;

--
-- AUTO_INCREMENT for table `manual_fg_entry`
--
ALTER TABLE `manual_fg_entry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `manufacturing_process`
--
ALTER TABLE `manufacturing_process`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34;

--
-- AUTO_INCREMENT for table `manufacturing_process_step`
--
ALTER TABLE `manufacturing_process_step`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `marketing_advice`
--
ALTER TABLE `marketing_advice`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `market_complaint`
--
ALTER TABLE `market_complaint`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `massage`
--
ALTER TABLE `massage`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `masterformula`
--
ALTER TABLE `masterformula`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `masters`
--
ALTER TABLE `masters`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `master_checklist`
--
ALTER TABLE `master_checklist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=85;

--
-- AUTO_INCREMENT for table `master_culture`
--
ALTER TABLE `master_culture`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `master_fg_types`
--
ALTER TABLE `master_fg_types`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=89;

--
-- AUTO_INCREMENT for table `master_index`
--
ALTER TABLE `master_index`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=93;

--
-- AUTO_INCREMENT for table `master_media`
--
ALTER TABLE `master_media`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `material_issue`
--
ALTER TABLE `material_issue`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=235;

--
-- AUTO_INCREMENT for table `material_type`
--
ALTER TABLE `material_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=271;

--
-- AUTO_INCREMENT for table `media`
--
ALTER TABLE `media`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `media_consumption`
--
ALTER TABLE `media_consumption`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `media_decontamination`
--
ALTER TABLE `media_decontamination`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `media_prepartion`
--
ALTER TABLE `media_prepartion`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `media_stock`
--
ALTER TABLE `media_stock`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `medicalcheckup`
--
ALTER TABLE `medicalcheckup`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `mfg_work_order_dtl`
--
ALTER TABLE `mfg_work_order_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=369;

--
-- AUTO_INCREMENT for table `mfg_work_order_hdr`
--
ALTER TABLE `mfg_work_order_hdr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=213;

--
-- AUTO_INCREMENT for table `mfr`
--
ALTER TABLE `mfr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mgmt_meeting`
--
ALTER TABLE `mgmt_meeting`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `microbiology_documents`
--
ALTER TABLE `microbiology_documents`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `micro_laf_pressurediff`
--
ALTER TABLE `micro_laf_pressurediff`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `micro_pressure`
--
ALTER TABLE `micro_pressure`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `micro_spec_test`
--
ALTER TABLE `micro_spec_test`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `micro_test`
--
ALTER TABLE `micro_test`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `micr_laf_log`
--
ALTER TABLE `micr_laf_log`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `moa_procdeatil`
--
ALTER TABLE `moa_procdeatil`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mrp`
--
ALTER TABLE `mrp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mst_batch_checklist`
--
ALTER TABLE `mst_batch_checklist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `mst_chlist_dtl`
--
ALTER TABLE `mst_chlist_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=108;

--
-- AUTO_INCREMENT for table `mst_documentData`
--
ALTER TABLE `mst_documentData`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=76;

--
-- AUTO_INCREMENT for table `mst_holidays`
--
ALTER TABLE `mst_holidays`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `mst_shift`
--
ALTER TABLE `mst_shift`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `mst_vendor_materials`
--
ALTER TABLE `mst_vendor_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=618;

--
-- AUTO_INCREMENT for table `need_training`
--
ALTER TABLE `need_training`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `Non_registration`
--
ALTER TABLE `Non_registration`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `onjob_training`
--
ALTER TABLE `onjob_training`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `oos`
--
ALTER TABLE `oos`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `oos_questions`
--
ALTER TABLE `oos_questions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `oos_tests`
--
ALTER TABLE `oos_tests`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `order_materials`
--
ALTER TABLE `order_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `outdoor_duty`
--
ALTER TABLE `outdoor_duty`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `outgoing_courier`
--
ALTER TABLE `outgoing_courier`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `outword`
--
ALTER TABLE `outword`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `packing`
--
ALTER TABLE `packing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `packing_batch_stages_ipqc_dtl`
--
ALTER TABLE `packing_batch_stages_ipqc_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `packing_category`
--
ALTER TABLE `packing_category`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `packing_manufacturing_process`
--
ALTER TABLE `packing_manufacturing_process`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `packing_stage`
--
ALTER TABLE `packing_stage`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `packing_stages_ipqc_dtl`
--
ALTER TABLE `packing_stages_ipqc_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `packing_stage_master`
--
ALTER TABLE `packing_stage_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `packing_stage_type`
--
ALTER TABLE `packing_stage_type`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `packing_style`
--
ALTER TABLE `packing_style`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `packsize`
--
ALTER TABLE `packsize`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `pack_size`
--
ALTER TABLE `pack_size`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=48;

--
-- AUTO_INCREMENT for table `pending_document`
--
ALTER TABLE `pending_document`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `plant`
--
ALTER TABLE `plant`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `po_entry`
--
ALTER TABLE `po_entry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `po_material`
--
ALTER TABLE `po_material`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=947;

--
-- AUTO_INCREMENT for table `premises_preventive`
--
ALTER TABLE `premises_preventive`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `pressure`
--
ALTER TABLE `pressure`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `pressure_master`
--
ALTER TABLE `pressure_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `pressure_plenum`
--
ALTER TABLE `pressure_plenum`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `product`
--
ALTER TABLE `product`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=107;

--
-- AUTO_INCREMENT for table `production_report`
--
ALTER TABLE `production_report`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `product_commercial_info`
--
ALTER TABLE `product_commercial_info`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `product_dev`
--
ALTER TABLE `product_dev`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `product_mrp`
--
ALTER TABLE `product_mrp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `product_other_information_api`
--
ALTER TABLE `product_other_information_api`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=779;

--
-- AUTO_INCREMENT for table `product_recall`
--
ALTER TABLE `product_recall`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `prod_dev_request`
--
ALTER TABLE `prod_dev_request`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `purchaseorder`
--
ALTER TABLE `purchaseorder`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=552;

--
-- AUTO_INCREMENT for table `qa_master`
--
ALTER TABLE `qa_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `qa_tn_employees`
--
ALTER TABLE `qa_tn_employees`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `qa_training_needs`
--
ALTER TABLE `qa_training_needs`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `qc_testing_results`
--
ALTER TABLE `qc_testing_results`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `qms_training`
--
ALTER TABLE `qms_training`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `qualification`
--
ALTER TABLE `qualification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- AUTO_INCREMENT for table `qualification_request`
--
ALTER TABLE `qualification_request`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `quotation`
--
ALTER TABLE `quotation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quotation_dtl`
--
ALTER TABLE `quotation_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=650;

--
-- AUTO_INCREMENT for table `quotation_hdr`
--
ALTER TABLE `quotation_hdr`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=656;

--
-- AUTO_INCREMENT for table `rack`
--
ALTER TABLE `rack`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `ratemrp`
--
ALTER TABLE `ratemrp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `raw_material`
--
ALTER TABLE `raw_material`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `raw_materials_table`
--
ALTER TABLE `raw_materials_table`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `receving`
--
ALTER TABLE `receving`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `refregirator_temp_record`
--
ALTER TABLE `refregirator_temp_record`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `refrigerator_cleaning`
--
ALTER TABLE `refrigerator_cleaning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `refrigerator_log`
--
ALTER TABLE `refrigerator_log`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rejection_destruction`
--
ALTER TABLE `rejection_destruction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rejection_online`
--
ALTER TABLE `rejection_online`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `rejection_rawpacking`
--
ALTER TABLE `rejection_rawpacking`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `requisition`
--
ALTER TABLE `requisition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `resignation`
--
ALTER TABLE `resignation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `resignation_clearnace`
--
ALTER TABLE `resignation_clearnace`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `retest`
--
ALTER TABLE `retest`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `retraining`
--
ALTER TABLE `retraining`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rinse_analysis`
--
ALTER TABLE `rinse_analysis`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `rinse_analysis_dtl`
--
ALTER TABLE `rinse_analysis_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `risk_departments`
--
ALTER TABLE `risk_departments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `risk_identification`
--
ALTER TABLE `risk_identification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `rnd_chemical`
--
ALTER TABLE `rnd_chemical`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `rnd_controlsample_rack`
--
ALTER TABLE `rnd_controlsample_rack`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `rnd_control_sample`
--
ALTER TABLE `rnd_control_sample`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `rnd_dev_optimisation`
--
ALTER TABLE `rnd_dev_optimisation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `rnd_dev_trial`
--
ALTER TABLE `rnd_dev_trial`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `rnd_dev_trials`
--
ALTER TABLE `rnd_dev_trials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rnd_equipment`
--
ALTER TABLE `rnd_equipment`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rnd_glassware`
--
ALTER TABLE `rnd_glassware`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rnd_hplc`
--
ALTER TABLE `rnd_hplc`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `rnd_indicator`
--
ALTER TABLE `rnd_indicator`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rnd_material`
--
ALTER TABLE `rnd_material`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `rnd_optimisation_trials`
--
ALTER TABLE `rnd_optimisation_trials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `rnd_predev`
--
ALTER TABLE `rnd_predev`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `rnd_product`
--
ALTER TABLE `rnd_product`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rnd_risk_departments`
--
ALTER TABLE `rnd_risk_departments`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rnd_risk_identification`
--
ALTER TABLE `rnd_risk_identification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rnd_techtransfer`
--
ALTER TABLE `rnd_techtransfer`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rnd_volumetric_master`
--
ALTER TABLE `rnd_volumetric_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `salary_annexure`
--
ALTER TABLE `salary_annexure`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `salary_annexure_details`
--
ALTER TABLE `salary_annexure_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=138;

--
-- AUTO_INCREMENT for table `salary_head`
--
ALTER TABLE `salary_head`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `salary_head_details`
--
ALTER TABLE `salary_head_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=65;

--
-- AUTO_INCREMENT for table `salary_types`
--
ALTER TABLE `salary_types`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `sales`
--
ALTER TABLE `sales`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=58;

--
-- AUTO_INCREMENT for table `salesmrp`
--
ALTER TABLE `salesmrp`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `sales_product`
--
ALTER TABLE `sales_product`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `sales_product_dtl`
--
ALTER TABLE `sales_product_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `sample_request`
--
ALTER TABLE `sample_request`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `sample_withdrawal`
--
ALTER TABLE `sample_withdrawal`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sampling`
--
ALTER TABLE `sampling`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=264;

--
-- AUTO_INCREMENT for table `samplingfg`
--
ALTER TABLE `samplingfg`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `sampling_batches`
--
ALTER TABLE `sampling_batches`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4280;

--
-- AUTO_INCREMENT for table `score`
--
ALTER TABLE `score`
  MODIFY `playerid` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `section`
--
ALTER TABLE `section`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `security_round`
--
ALTER TABLE `security_round`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `send_checklist`
--
ALTER TABLE `send_checklist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `service`
--
ALTER TABLE `service`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `shelf`
--
ALTER TABLE `shelf`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `shelf_life`
--
ALTER TABLE `shelf_life`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `shift`
--
ALTER TABLE `shift`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `shift_allocation`
--
ALTER TABLE `shift_allocation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `shift_schedule`
--
ALTER TABLE `shift_schedule`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `shortages`
--
ALTER TABLE `shortages`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `software_customization`
--
ALTER TABLE `software_customization`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `software_restriction`
--
ALTER TABLE `software_restriction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `solid_media`
--
ALTER TABLE `solid_media`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sopinitiation`
--
ALTER TABLE `sopinitiation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `sops`
--
ALTER TABLE `sops`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sop_details`
--
ALTER TABLE `sop_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sop_distribution`
--
ALTER TABLE `sop_distribution`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sop_gen`
--
ALTER TABLE `sop_gen`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sop_generate`
--
ALTER TABLE `sop_generate`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `sop_generate_drafts`
--
ALTER TABLE `sop_generate_drafts`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `sop_revision`
--
ALTER TABLE `sop_revision`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sop_training`
--
ALTER TABLE `sop_training`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `special_grade`
--
ALTER TABLE `special_grade`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `specification`
--
ALTER TABLE `specification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=364;

--
-- AUTO_INCREMENT for table `spec_revision`
--
ALTER TABLE `spec_revision`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=404;

--
-- AUTO_INCREMENT for table `spec_tests`
--
ALTER TABLE `spec_tests`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=895;

--
-- AUTO_INCREMENT for table `spillage`
--
ALTER TABLE `spillage`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `stability_batch`
--
ALTER TABLE `stability_batch`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT for table `stability_chember`
--
ALTER TABLE `stability_chember`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stability_study`
--
ALTER TABLE `stability_study`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `stability_testing`
--
ALTER TABLE `stability_testing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stagemaster`
--
ALTER TABLE `stagemaster`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stages`
--
ALTER TABLE `stages`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `stages_ipqc`
--
ALTER TABLE `stages_ipqc`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `stages_ipqc_dtl`
--
ALTER TABLE `stages_ipqc_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `standard_master`
--
ALTER TABLE `standard_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `state`
--
ALTER TABLE `state`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `state_master`
--
ALTER TABLE `state_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stationary_management`
--
ALTER TABLE `stationary_management`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `std_weight`
--
ALTER TABLE `std_weight`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `steam_operation`
--
ALTER TABLE `steam_operation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `stereo`
--
ALTER TABLE `stereo`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stereo_dist`
--
ALTER TABLE `stereo_dist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stereo_distruction`
--
ALTER TABLE `stereo_distruction`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stock_book`
--
ALTER TABLE `stock_book`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=472;

--
-- AUTO_INCREMENT for table `storage_condition`
--
ALTER TABLE `storage_condition`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `storage_conditions`
--
ALTER TABLE `storage_conditions`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT for table `subcategory`
--
ALTER TABLE `subcategory`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `subtest`
--
ALTER TABLE `subtest`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=74;

--
-- AUTO_INCREMENT for table `swab_analysis`
--
ALTER TABLE `swab_analysis`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `task`
--
ALTER TABLE `task`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `tax_invoice`
--
ALTER TABLE `tax_invoice`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `tax_invoice_product`
--
ALTER TABLE `tax_invoice_product`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `technical_info`
--
ALTER TABLE `technical_info`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `temperature`
--
ALTER TABLE `temperature`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `temp_refrigerator`
--
ALTER TABLE `temp_refrigerator`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `terms`
--
ALTER TABLE `terms`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `test`
--
ALTER TABLE `test`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62;

--
-- AUTO_INCREMENT for table `testing`
--
ALTER TABLE `testing`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=153;

--
-- AUTO_INCREMENT for table `testing_tests`
--
ALTER TABLE `testing_tests`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=386;

--
-- AUTO_INCREMENT for table `test_methods`
--
ALTER TABLE `test_methods`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=382;

--
-- AUTO_INCREMENT for table `thermic_operation`
--
ALTER TABLE `thermic_operation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `therotical_test`
--
ALTER TABLE `therotical_test`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tn_employees`
--
ALTER TABLE `tn_employees`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=64;

--
-- AUTO_INCREMENT for table `toilet_bathroom`
--
ALTER TABLE `toilet_bathroom`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `tools`
--
ALTER TABLE `tools`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `training_feedback`
--
ALTER TABLE `training_feedback`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `training_needs`
--
ALTER TABLE `training_needs`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46;

--
-- AUTO_INCREMENT for table `training_subject`
--
ALTER TABLE `training_subject`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transporter_bill`
--
ALTER TABLE `transporter_bill`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transporter_management`
--
ALTER TABLE `transporter_management`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transport_complaint`
--
ALTER TABLE `transport_complaint`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transport_master`
--
ALTER TABLE `transport_master`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `unit`
--
ALTER TABLE `unit`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=81;

--
-- AUTO_INCREMENT for table `unitformula`
--
ALTER TABLE `unitformula`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=179;

--
-- AUTO_INCREMENT for table `unitformula_packing_materials`
--
ALTER TABLE `unitformula_packing_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=166;

--
-- AUTO_INCREMENT for table `unitformula_pm_dtl`
--
ALTER TABLE `unitformula_pm_dtl`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=165;

--
-- AUTO_INCREMENT for table `unit_materials`
--
ALTER TABLE `unit_materials`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `utensil_usage`
--
ALTER TABLE `utensil_usage`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `uv_burning`
--
ALTER TABLE `uv_burning`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vechile_entry`
--
ALTER TABLE `vechile_entry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `vehicle_management`
--
ALTER TABLE `vehicle_management`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `vendor1`
--
ALTER TABLE `vendor1`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vendorquotation`
--
ALTER TABLE `vendorquotation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vendor_checklist`
--
ALTER TABLE `vendor_checklist`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vendor_doc`
--
ALTER TABLE `vendor_doc`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ventfilter`
--
ALTER TABLE `ventfilter`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ventfilter_replacement`
--
ALTER TABLE `ventfilter_replacement`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `vessel_entry`
--
ALTER TABLE `vessel_entry`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `volumetric_preparation`
--
ALTER TABLE `volumetric_preparation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `volumetric_solution`
--
ALTER TABLE `volumetric_solution`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=150;

--
-- AUTO_INCREMENT for table `vouchev`
--
ALTER TABLE `vouchev`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `washWater`
--
ALTER TABLE `washWater`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `water_investigation`
--
ALTER TABLE `water_investigation`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `water_point`
--
ALTER TABLE `water_point`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `water_specification`
--
ALTER TABLE `water_specification`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `water_tank`
--
ALTER TABLE `water_tank`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `weekly_off`
--
ALTER TABLE `weekly_off`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `weight_check`
--
ALTER TABLE `weight_check`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `workorder`
--
ALTER TABLE `workorder`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `work_order_batch_lots`
--
ALTER TABLE `work_order_batch_lots`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=280;

--
-- AUTO_INCREMENT for table `z_forms`
--
ALTER TABLE `z_forms`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;
COMMIT;

