INSERT INTO `templates` (`id`, `communicationmode_id`, `templatetype_id`, `subject`, `description`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(80, 2, NULL, 'Consignment challan from Octanics', '<p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Dear {{customer}},</span>&nbsp;</p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Greetings from <span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">{{companyname}}</span></span></strong></span></span>.</span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Please find attached consignment challan for {{title}}.</span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">For any queries please contact us on {{companycontactnumber}}. Looking forward to hear from you.</span></span></strong></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Best Regards,</span></span></strong></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">{{companyname}}</span></span></strong></span></span></p><p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"https://www.froala.com/wysiwyg-editor?pb=1\" title=\"Froala Editor\">Froala Editor</a></p>', 1, -1, '2022-09-13 05:12:39', -1, '2022-09-13 05:12:39', NULL, NULL),
(81, NULL, 45, NULL, '<p style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: \"Titillium Web\", sans-serif; color: rgb(50, 50, 50); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);\'><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 12px;\">1. Pls issue Tax :</span></p><p style=\'box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: \"Titillium Web\", sans-serif; color: rgb(50, 50, 50); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);\'><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 12px;\"><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: Verdana, Geneva, sans-serif;\">2. Terms of payment :</span></span></p><p style=\'box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: \"Titillium Web\", sans-serif; color: rgb(50, 50, 50); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);\'><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 12px;\"><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: Verdana, Geneva, sans-serif;\">3. Advance details ( If any ) :</span></span></p><p style=\'box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: \"Titillium Web\", sans-serif; color: rgb(50, 50, 50); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);\'><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 12px;\"><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: Verdana, Geneva, sans-serif;\">Cheque or DD no./ Date :<span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; white-space: pre;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></span></span></p><p style=\'box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: \"Titillium Web\", sans-serif; color: rgb(50, 50, 50); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);\'><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 12px;\"><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: Verdana, Geneva, sans-serif;\">Drawn on amount :<span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; white-space: pre;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></span></span></p><p style=\'box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: \"Titillium Web\", sans-serif; color: rgb(50, 50, 50); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);\'><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 12px;\"><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: Verdana, Geneva, sans-serif;\">4. Tax Exemption / Concessional Tax form attached with order if any :</span></span></p><p style=\'box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: \"Titillium Web\", sans-serif; color: rgb(50, 50, 50); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);\'><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-size: 12px;\"><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: Verdana, Geneva, sans-serif;\">5. Road permit no. attached with the order &nbsp;(If any)</span></span></p><p style=\'box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: \"Titillium Web\", sans-serif; color: rgb(50, 50, 50); font-size: 16px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(255, 255, 255);\'><span style=\"box-sizing: border-box; margin: 0px; padding: 0px; outline: 0px; font-family: Verdana, Geneva, sans-serif; font-size: 12px;\">** Delivery address subject to fullfillment of Sales tax requirement (If any)</span></p>', 1, -1, '2022-09-13 05:12:39', -1, '2022-09-13 05:12:39', NULL, NULL),
(82, NULL, 7, NULL, '<p>Terms &amp; Conditions goes here</p>', 1, -1, '2022-09-13 05:12:39', -1, '2022-09-13 05:12:39', NULL, NULL),
(83, 2, 55, 'Task from Octanics', 'Dear {{customername}},\r\nYour task of {{taskname}} for {{projectname}} has been allocated and your task details are as below.\r\nTask No: {{taskno}}\r\nDescription :{{description}}\r\nDue Date:{{duedate}}\r\nTechnician Details :-\r\nName : {{employeename}}\r\nMobile No.: {{mobileno}}\r\nBest Regards,\r\nTurbobusiness', 1, -1, '2022-09-13 05:12:39', -1, '2022-09-13 05:12:39', NULL, NULL),
(84, 2, 57, 'Project from Octanics', 'Dear {{customername}}, <br><br>\r\nYour project details are as below.<br>\r\nProject No: {{projectno}}<br>\r\nTitle : {{projectname}}<br>\r\nDescription :{{description}}<br>\r\nStart Date:{{startdate}}<br>\r\nEnd Date:{{enddate}}<br>\r\nStatus:{{status}}<br>\r\nEstimated Budget:{{budget}}<br>\r\nTechnician Details :-<br>\r\nName : {{employeename}}<br>\r\nMobile No.: {{mobileno}}<br>\r\nBest Regards,<br>\r\n{{companyname}}', 1, -1, '2022-09-13 05:12:39', -1, '2022-09-13 05:12:39', NULL, NULL),
(85, 2, 35, '', '<p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Dear {{customer}},</span>&nbsp;</p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Greetings from <span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">{{companyname}}</span></span></strong></span></span>.</span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">We are delighted to have your interest in the services offered by&nbsp;<span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">{{companyname}}.</span></span></strong></span></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Please find attached bill of quantities for more details.<span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">&nbsp;{{companycontactnumber}}.</span></span></strong></span></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">For any queries please contact us on Looking forward to hear from you.</span></span></strong></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Best Regards,</span></span></strong></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">{{companyname}}</span></span></strong></span></span></p>', 1, -1, '2022-09-13 05:12:39', -1, '2022-09-13 05:12:39', NULL, NULL),
(86, 2, 51, 'Ewaybill from Octanics', '<p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Dear {{customer}},</span>&nbsp;</p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Greetings from <span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">{{companyname}}</span></span></strong></span></span>.</span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">We are delighted to have your interest in the services offered by&nbsp;<span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">{{companyname}}.</span></span></strong></span></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Please find attached Eway Bill for more details.<span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">&nbsp;{{companycontactnumber}}.</span></span></strong></span></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">For any queries please contact us on Looking forward to hear from you.</span></span></strong></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">Best Regards,</span></span></strong></span></span></p><p><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><strong><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\"><span style=\"color: rgb(34, 34, 34); font-family: Arial; font-size: 12px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;\">{{companyname}}</span></span></strong></span></span></p>', 1, -1, '2022-09-13 05:12:39', -1, '2022-09-13 05:12:39', NULL, NULL),
(87, NULL, 52, NULL, '<p><span style=\"font-family: Verdana, Geneva, sans-serif; font-size: 12px;\">Dear Sir/Ma&rsquo;am</span></p><p>coverletter goes to here</p>', 1, -1, '2022-09-13 05:12:39', -1, '2022-09-13 05:12:39', NULL, NULL);
INSERT INTO `templates` (`id`, `communicationmode_id`, `templatetype_id`, `subject`, `description`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(88, NULL, 53, NULL, '<p><span style=\"font-family: Verdana, Geneva, sans-serif; font-size: 12px;\">Above all prices are inclusive of GST. Proposal Estimate Validity Remains for 30 Days.</span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\">We request you to check the BODY COLOR &amp; LIGHT TEMPERATURE in the proposal,. Once ordered cannot &nbsp;be replaced.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\">Please noted once the order is placed it cannot be altered or cancelled as most of the luminaries we deal into are tailor made and in accordance to site specification/need.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\">Do not cover the lights with any newspaper or paper, it will damage the light.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\"><strong>WARRANTY:&nbsp;</strong>Warranty differs from 6 months to 5 years, which depend &nbsp;on &nbsp;brand, specifications and luminaries&#39; type. Warranty details are specified in the Quote along with product.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\">Warranty will be against any manufacturing defects, warranty will be void incase of mishandlings, voltage fluctuations, earthing issue and damage due to water.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\"><strong>PAYMENT:</strong> a) 50% advance payment to be made for Project Initiation, Cut-Out Samples, Required site Audit, Installation techniques and for technical drawings if needed.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; b) 50% at the time of delivery. GST details to be added.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; c) Installation and demo charges will be imposed separately.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\"><strong>SITE SERVICE:</strong> On site supervision will be provided for 90 days. In other case, client will have to send the fixture to our repairing Centre.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\"><strong>DELIVERY PERIOD:&nbsp;</strong>Material delivery are subject to be form 4 days- 30 days from date of confirmed purchase with advance payment. Above prices are restricted to the &nbsp;scope of supply only. Any changes in scope (i.e. installation / installation support/ installation accessories) will attract additional charges and this will effect the proposal given. Delivery charges will be billed along with the actual invoice.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\">For outstation projects lodging/ Boarding &amp; transportations shall be taken care by the client.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\"><strong>PROFILE LIGHT:</strong> We request client to have proper mounting for installation of customized luminaries, also have a serviceable mounting for future maintenance.</span></span></p><p><span style=\"font-size: 12px;\"><span style=\"font-family: Verdana,Geneva,sans-serif;\"><strong>INSTALLATION REQUEST:</strong>&nbsp; We have observed over the period of time that painting agencies stick light fixtures along with the material they use ( i.e. putty, color and polish)</span></span></p><p><span style=\"font-family: Verdana, Geneva, sans-serif; font-size: 12px;\">kindly request them to keep the fixtures independent for future servicing and maintenance.</span></p><p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"https://www.froala.com/wysiwyg-editor?pb=1\" title=\"Froala Editor\">Froala Editor</a></p>', 1, -1, '2022-09-13 05:12:39', -1, '2022-09-13 05:12:39', NULL, NULL);

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

--
-- Table structure for table `templatetypes`
--

CREATE TABLE `templatetypes` (
  `id` int(11) NOT NULL,
  `module_id` int(11) DEFAULT NULL,
  `name` varchar(200) DEFAULT NULL,
  `code` varchar(100) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `templatetypes`
--

INSERT INTO `templatetypes` (`id`, `module_id`, `name`, `code`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 3, 'Complaint Appointment Booked', 'COMPAPPOINTMENT', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(2, 3, 'Complaint Allocated Location', 'COMPALLOCATEDLOCATION', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(3, 3, 'Feedback Request', 'FEEDBACKREQ', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(4, 3, 'Jobwork Allocated Location', 'JOBWORKALLOCATEDLOCATION', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(5, 3, 'AMC Registered', 'AMCREGISTERED', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(6, 3, 'AMC Renewal', 'AMCRENEWAL', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(7, 3, 'AMC Terms & Conditions', 'AMCTERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(8, 3, 'Service Registered', 'SERREG', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(9, 3, 'Send AMC', 'SENDAMC', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(10, 3, 'Complaint Service OTP', 'COMPSERVICEOTP', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(11, 3, 'Service Report', 'SERVICERPT', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(12, 3, 'Handing Over Report', 'HANDINGOVERRPT', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(13, 3, 'Complaint Assigned Details', 'COMPASSIGNEDDET', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(14, 3, 'Complaint Technician Details', 'COMPTECHNICIANDETAIL', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(15, 3, ' Jobwork Assigned Details', 'JOBWORKASSIGNEDDETAIL', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(16, 3, 'Service Registered Details', 'SERVICEREGISTEREDDETAIL', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(17, 3, 'Send Amc Service', 'SENDAMCSERVICE', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(18, 2, 'Welcome Customer', 'WELCOMECUST', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(19, 2, 'Send Quotation', 'SENDQUOTE', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(20, 2, 'Send Invoice', 'SENDINVOICE', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(21, 2, 'Payment Reminder', 'PMTREMINDER', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(22, 2, 'Payment Received', 'PMTRECV', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(23, 2, 'Quotation Cover Letter', 'QUOTECOVERLETT', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(24, 2, 'Quotation Terms & Conditions', 'QUOTETERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(25, 2, 'Sales Order Terms & Conditions', 'SALESORDERTERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(26, 2, 'Invoice Terms & Conditions', 'INVOICETERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(27, 2, 'Warranty Letter Terms & Conditions', 'WARRLETTTERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(28, 2, 'Send Sales Order', 'SENDSALESORD', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(29, 2, 'Warranty Cover Letter', 'WARRCOVERLETT', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(30, 2, 'Send Warranty Letter', 'SENDWARRLETT', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(31, 2, 'BOQ Terms & Condition', 'BOQTERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(32, 2, 'BOQ Cover Letter', 'BOQCOVERLETT', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(33, 2, 'Appointment Booking', 'APPOINTMENTBOOKING', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(34, 2, 'Appointment Booking Location', 'APPOINTMENTBOOKINGLOCATION', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(35, 2, 'Send Bill Of Quantities', 'SENDBOQ', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(36, 2, 'Send Delivery Challan', 'SENDDELCHALLAN', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(37, 2, 'Delivery Challan Terms & Conditions', 'DELIVERYCHALLANETERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(38, 2, 'Feedback Request', 'CUSTOMERFEEDBACKREQ', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(39, 2, 'Send Warranty Service', 'SENDWARRANTYSERVICE', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(40, 7, 'Welcome Employee', 'WELCOMEEMP', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(41, 7, 'Recruitment Application', 'RECRUITAPP', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(42, 7, 'Send Interview Schedule', 'SENDINTERSCHED', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(43, 7, 'Send Offer Letter', 'SENDOFFERLETT', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(44, 5, 'Send Purchase Order', 'SENDPURORD', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(45, 5, 'Purchase Order Terms & Conditions', 'PURORDTERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(46, 5, 'Raw Material Purchase Order Terms & Conditions', 'RAWMPURORDTERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(47, 5, 'Send Product Purchase Order', 'SENDPRDCTPURCHASEORD', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(48, 5, 'Send Product Purchase Order', 'SENDRAWMTRALPURCHASEORDER', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(49, 8, 'Send Payslip', 'SENDPAYSLIP', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(50, 11, 'Send PaymentSlip', 'SENDPAYMENTSLIP', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(51, 11, 'Send Eway Bill', 'SENDEBL', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(52, 11, 'Payment Slip Cover Letter', 'PAYMENTSLIPCOVERLETTER', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(53, 11, 'Payment Slip Terms & Conditions', 'PAYMENTSLIPTERMS', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(54, 11, 'Payment Slip Features', 'PAYMENTSLIPFEATURE', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(55, 4, 'Send Task', 'SENDTASK', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(56, 4, 'Task Allocated', 'TASKALLOCATED', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(57, 4, 'Send Project', 'SENDPROJECT', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL),
(58, 4, 'Project Allocated', 'PROJECTALLOCATED', 1, -1, '2022-09-13 05:12:20', -1, '2022-09-13 05:12:20', NULL, NULL);

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

--
-- Table structure for table `tenderassignmenthistory`
--

CREATE TABLE `tenderassignmenthistory` (
  `id` int(11) NOT NULL,
  `tender_id` int(11) DEFAULT NULL,
  `employee_id` int(11) DEFAULT NULL,
  `jobtitle_id` int(11) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `tendercommunicationhistory`
--

CREATE TABLE `tendercommunicationhistory` (
  `id` int(11) NOT NULL,
  `tender_id` int(11) DEFAULT NULL,
  `tendercommunicationtype_id` int(11) DEFAULT NULL,
  `followupdate` datetime DEFAULT NULL,
  `comment` text,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `tenderdetails`
--

CREATE TABLE `tenderdetails` (
  `id` int(11) NOT NULL,
  `tender_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `qty` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `tenderdocuments`
--

CREATE TABLE `tenderdocuments` (
  `id` int(11) NOT NULL,
  `tender_id` int(11) DEFAULT NULL,
  `documentpath` varchar(255) DEFAULT NULL,
  `documenttype_id` int(11) DEFAULT NULL,
  `otherdocumenttype` varchar(50) DEFAULT NULL,
  `originalfilename` varchar(100) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '1',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default by -1 for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value-1 for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `tenders`
--

CREATE TABLE `tenders` (
  `id` int(11) NOT NULL,
  `leadsource_id` int(11) DEFAULT NULL,
  `business_id` int(11) DEFAULT NULL,
  `tendertype_id` int(11) DEFAULT NULL,
  `tenderstatus_id` int(11) DEFAULT NULL,
  `technicalstatus_id` int(11) DEFAULT NULL,
  `bidopeningdate` datetime DEFAULT NULL,
  `bidsubmissiondate` datetime DEFAULT NULL,
  `rownumber` varchar(100) DEFAULT NULL,
  `tendernumber` varchar(255) DEFAULT NULL,
  `referencenumber` varchar(50) DEFAULT NULL,
  `project` varchar(50) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `city_id` int(11) DEFAULT NULL,
  `address_id` int(11) DEFAULT NULL,
  `state_id` int(11) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `duedate` datetime DEFAULT NULL,
  `date` date DEFAULT NULL,
  `contactperson` varchar(50) DEFAULT NULL,
  `businessphone2` varchar(20) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `offervalue` decimal(18,2) DEFAULT NULL,
  `businessphone1` varchar(20) DEFAULT NULL,
  `mobilephone` varchar(20) DEFAULT NULL,
  `businessphone3` varchar(20) DEFAULT NULL,
  `fax` varchar(20) DEFAULT NULL,
  `postcode` varchar(20) DEFAULT 'NULL',
  `street1` text,
  `street2` text,
  `street3` text,
  `note` varchar(100) DEFAULT NULL,
  `quotationnumber` varchar(255) DEFAULT NULL,
  `month_id` int(11) DEFAULT NULL,
  `year_id` int(11) DEFAULT NULL,
  `target` decimal(18,2) DEFAULT NULL,
  `forecastnote` text,
  `possibility` decimal(18,2) DEFAULT NULL,
  `active` int(11) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `tenderstatus`
--

CREATE TABLE `tenderstatus` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `code` varchar(100) DEFAULT NULL,
  `displayorder` int(10) DEFAULT NULL,
  `active` tinyint(4) NOT NULL DEFAULT '0',
  `created_by` int(11) NOT NULL DEFAULT '-1' COMMENT 'Default value -1 for admin',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) NOT NULL DEFAULT '-1' COMMENT 'Default value -1 for admin',
  `modified_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tenderstatus`
--

INSERT INTO `tenderstatus` (`id`, `name`, `code`, `displayorder`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Won', 'WON', 1, 1, -1, '2021-07-19 20:14:34', -1, '2021-07-19 20:15:28', NULL, NULL),
(2, 'Lost', 'LOST', 2, 1, -1, '2021-07-19 20:14:34', -1, '2021-07-19 20:15:28', NULL, NULL),
(3, 'In Process', 'INPROCESS', 3, 1, -1, '2021-11-13 02:45:11', -1, '2021-11-13 02:45:11', NULL, NULL),
(4, 'Regret', 'REGRET', 4, 1, -1, '2021-11-13 02:45:11', -1, '2021-11-13 02:45:11', NULL, NULL),
(5, 'Sub Pending', 'SUBMISSIONPENDING', 5, 1, -1, '2021-11-13 02:45:11', -1, '2021-11-13 02:45:11', NULL, NULL),
(6, 'Dead', 'DEAD', 6, 1, -1, '2021-11-13 02:45:11', -1, '2021-11-13 02:45:11', NULL, NULL),
(7, 'Retender', 'RETENDER', 7, 1, -1, '2021-11-13 02:45:11', -1, '2021-11-13 02:45:11', NULL, NULL);

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

--
-- Table structure for table `tenderstechnicalstatus`
--

CREATE TABLE `tenderstechnicalstatus` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `code` varchar(150) DEFAULT NULL,
  `displayorder` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tenderstechnicalstatus`
--

INSERT INTO `tenderstechnicalstatus` (`id`, `name`, `code`, `displayorder`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Qualified', 'QUALIFIED', 1, 1, -1, '2021-08-31 14:12:23', -1, '2021-08-31 14:12:23', NULL, NULL),
(2, 'Dead', 'DEAD', 2, 1, -1, '2021-08-31 15:33:59', -1, '2021-08-31 15:33:59', NULL, NULL);

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

--
-- Table structure for table `tendertypes`
--

CREATE TABLE `tendertypes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `code` varchar(100) DEFAULT NULL,
  `displayorder` int(10) DEFAULT NULL,
  `active` tinyint(4) NOT NULL DEFAULT '0',
  `created_by` int(11) NOT NULL DEFAULT '-1' COMMENT 'Default value -1 for admin',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) NOT NULL DEFAULT '-1' COMMENT 'Default value -1 for admin',
  `modified_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tendertypes`
--

INSERT INTO `tendertypes` (`id`, `name`, `code`, `displayorder`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Open', 'OPEN', 1, 1, -1, '2021-07-19 20:14:34', -1, '2021-07-19 20:15:28', NULL, NULL),
(2, 'Limited', 'LIMITED', 2, 1, -1, '2021-07-19 20:14:34', -1, '2021-07-19 20:15:28', NULL, NULL),
(3, 'EOI', 'EOI', 3, 1, -1, '2021-11-13 02:44:29', -1, '2021-11-13 02:44:29', NULL, NULL);

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

--
-- Table structure for table `timesheet`
--

CREATE TABLE `timesheet` (
  `id` int(11) NOT NULL,
  `business_id` int(11) DEFAULT NULL,
  `employee_id` int(11) DEFAULT NULL,
  `worksite_id` int(11) DEFAULT NULL,
  `shift_id` int(11) DEFAULT NULL,
  `workingdaytype_id` int(11) DEFAULT NULL,
  `status_id` int(11) DEFAULT NULL,
  `startdate` datetime DEFAULT NULL,
  `enddate` datetime DEFAULT NULL,
  `starttime` time DEFAULT '00:00:00',
  `endtime` time DEFAULT '00:00:00',
  `remark` varchar(500) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `inlocation` varchar(2000) DEFAULT NULL,
  `intime` datetime DEFAULT NULL,
  `outlocation` varchar(2000) DEFAULT NULL,
  `outtime` datetime DEFAULT NULL,
  `lunchbreak` time DEFAULT '00:00:00',
  `totalhours` time DEFAULT '00:00:00',
  `workedday` decimal(18,2) DEFAULT NULL,
  `attendend_id` int(11) DEFAULT NULL,
  `workedhours` time DEFAULT '00:00:00',
  `latehours` time DEFAULT NULL,
  `overtimehours` time DEFAULT NULL,
  `finallatehours` time DEFAULT NULL,
  `finalovertimehours` time DEFAULT NULL,
  `active` tinyint(4) NOT NULL DEFAULT '0',
  `created_by` tinyint(4) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP COMMENT 'Default value -1 if for admin ',
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `inlatitude` decimal(18,2) DEFAULT NULL,
  `outlatitude` decimal(18,2) DEFAULT NULL,
  `inlongitude` decimal(18,2) DEFAULT NULL,
  `outlongitude` decimal(18,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `timesheetstatus`
--

CREATE TABLE `timesheetstatus` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `code` varchar(100) DEFAULT NULL,
  `displayorder` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `timesheetstatus`
--

INSERT INTO `timesheetstatus` (`id`, `name`, `code`, `displayorder`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Pending', 'PENDING', 1, 1, -1, '2021-07-17 18:10:02', -1, '2021-07-17 18:10:02', NULL, NULL),
(2, 'Approved', 'APPROVED', 2, 1, -1, '2021-07-17 18:10:22', -1, '2021-07-17 18:10:22', NULL, NULL);

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

--
-- Table structure for table `trainings`
--

CREATE TABLE `trainings` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT NULL,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `id` int(11) NOT NULL,
  `business_id` int(11) DEFAULT NULL,
  `transactiondate` datetime DEFAULT CURRENT_TIMESTAMP,
  `effectivedate` datetime DEFAULT CURRENT_TIMESTAMP,
  `account_id` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `transactionsubtypes`
--

CREATE TABLE `transactionsubtypes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL,
  `code` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `transactionsubtypes`
--

INSERT INTO `transactionsubtypes` (`id`, `name`, `code`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Supply', 'SPL', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL),
(2, 'Import', 'IPT', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL),
(3, 'Export', 'EXT', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL),
(4, 'Job Work', 'JWK', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL),
(5, 'For Own Use', 'FOU', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL),
(6, 'JobWork Returns', 'JWR', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL),
(7, 'Sales Returns', 'SLR', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL),
(8, 'Others', 'OTR', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL);

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

--
-- Table structure for table `transportationtypes`
--

CREATE TABLE `transportationtypes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `active` int(11) DEFAULT NULL,
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT NULL,
  `modified_by` int(11) NOT NULL DEFAULT '-1',
  `modified_at` datetime DEFAULT NULL,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `transportationtypes`
--

INSERT INTO `transportationtypes` (`id`, `name`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'By Air', 1, 2, '2020-07-05 23:04:12', 2, '2020-07-05 23:04:12', NULL, NULL),
(2, 'By Road', 1, 2, '2020-07-05 23:04:21', 2, '2020-07-05 23:04:21', NULL, NULL);

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

--
-- Table structure for table `travelallowances`
--

CREATE TABLE `travelallowances` (
  `id` int(11) NOT NULL,
  `worksite_id` int(11) DEFAULT NULL,
  `skillcategory_id` int(11) DEFAULT NULL,
  `amount` decimal(18,2) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) NOT NULL DEFAULT '-1',
  `modified_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `travelexpenses`
--

CREATE TABLE `travelexpenses` (
  `id` int(11) NOT NULL,
  `business_id` int(11) DEFAULT NULL,
  `employee_id` int(11) DEFAULT NULL,
  `expensetypes_id` int(11) DEFAULT NULL,
  `travelbill` varchar(255) DEFAULT NULL,
  `expensedate` datetime DEFAULT NULL,
  `amount` decimal(18,2) DEFAULT NULL,
  `expensestypes` varchar(50) DEFAULT NULL,
  `remark` text,
  `travelexpensestatus_id` int(11) DEFAULT NULL,
  `approvedby_id` int(11) DEFAULT NULL,
  `approveddate` datetime DEFAULT NULL,
  `rejectnotes` varchar(200) DEFAULT NULL,
  `paiddate` datetime DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT '	Default value -1 if for admin	',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT '	Default value -1 if for admin	',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `travelexpensestatus`
--

CREATE TABLE `travelexpensestatus` (
  `id` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `code` varchar(150) DEFAULT NULL,
  `displayorder` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Defaul value -1\r\nif for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Defaul value -1\r\nif for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `travelexpensestatus`
--

INSERT INTO `travelexpensestatus` (`id`, `name`, `code`, `displayorder`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Approved', 'APPROVED', 1, 1, -1, '2020-11-18 17:04:08', -1, '2020-11-18 17:04:08', NULL, NULL),
(2, 'Paid', 'PAID', 2, 1, -1, '2020-11-18 17:04:08', -1, '2020-11-18 17:04:08', NULL, NULL),
(3, 'Rejected', 'REJECT', 3, 1, -1, '2020-11-18 17:04:35', -1, '2020-11-18 17:04:35', NULL, NULL);

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

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

CREATE TABLE `unit` (
  `id` int(11) NOT NULL,
  `name` varchar(20) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `userroles`
--

CREATE TABLE `userroles` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `userroles`
--

INSERT INTO `userroles` (`id`, `user_id`, `role_id`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 1, 1, 1, -1, '2022-09-13 05:17:15', -1, '2022-09-13 05:17:15', NULL, NULL),
(2, 2, 1, 1, -1, '2022-09-13 05:17:15', -1, '2022-09-13 05:17:15', NULL, NULL),
(3, 3, 1, 1, -1, '2022-09-13 10:05:22', -1, '2022-09-13 10:05:22', NULL, NULL),
(4, 4, 1, 1, -1, '2022-09-13 10:05:22', -1, '2022-09-13 10:05:22', NULL, NULL);

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

--
-- Table structure for table `usertype`
--

CREATE TABLE `usertype` (
  `id` int(11) NOT NULL,
  `name` text,
  `code` varchar(150) DEFAULT NULL,
  `displayorder` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin	',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin	',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `usertype`
--

INSERT INTO `usertype` (`id`, `name`, `code`, `displayorder`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Admin', 'ADMIN', 1, 1, -1, '2022-02-02 11:27:33', -1, '2022-02-02 11:27:33', NULL, NULL),
(2, 'Staff', 'STAFF', 2, 1, -1, '2022-02-02 11:28:22', -1, '2022-02-02 11:28:22', NULL, NULL);

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

--
-- Table structure for table `vehicletypes`
--

CREATE TABLE `vehicletypes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL,
  `code` varchar(100) CHARACTER SET utf8mb4 DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `vehicletypes`
--

INSERT INTO `vehicletypes` (`id`, `name`, `code`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Regular', 'REG', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL),
(2, 'Cargo', 'CRG', 1, -1, '2022-05-24 05:39:55', -1, '2022-05-24 05:39:55', NULL, NULL);

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

--
-- Table structure for table `vendoraddresses`
--

CREATE TABLE `vendoraddresses` (
  `id` int(11) NOT NULL,
  `vendor_id` int(11) DEFAULT NULL,
  `addresstype_id` int(11) DEFAULT NULL,
  `street1` text,
  `street2` text,
  `location` text,
  `postcode` varchar(20) DEFAULT NULL,
  `city_id` int(11) DEFAULT NULL,
  `state_id` int(11) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `vendorbankdetails`
--

CREATE TABLE `vendorbankdetails` (
  `id` int(11) NOT NULL,
  `vendor_id` int(11) DEFAULT NULL,
  `bankaccountno` varchar(50) DEFAULT NULL,
  `bankaccountholder` varchar(100) DEFAULT NULL,
  `bankname` varchar(100) DEFAULT NULL,
  `bankbranchname` varchar(150) DEFAULT NULL,
  `ifsccode` varchar(100) DEFAULT NULL,
  `bankaddress1` text,
  `bankaddress2` text,
  `bankaddress3` text,
  `city_id` int(11) DEFAULT NULL,
  `state_id` int(11) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `pincode` varchar(20) DEFAULT NULL,
  `active` tinyint(4) NOT NULL DEFAULT '0',
  `created_by` int(11) NOT NULL DEFAULT '-1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) NOT NULL DEFAULT '-1',
  `modified_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `vendorcommunicationhistory`
--

CREATE TABLE `vendorcommunicationhistory` (
  `id` int(11) NOT NULL,
  `vendor_id` int(11) DEFAULT NULL,
  `vendorcommunicationtype_id` int(11) DEFAULT NULL,
  `followupdate` datetime DEFAULT NULL,
  `comment` text,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `vendorcommunicationtype`
--

CREATE TABLE `vendorcommunicationtype` (
  `id` int(11) NOT NULL,
  `displayorder` int(11) NOT NULL,
  `name` text,
  `weightage` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `vendorcommunicationtype`
--

INSERT INTO `vendorcommunicationtype` (`id`, `displayorder`, `name`, `weightage`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 2, 'Followup Calls', 1, 1, -1, '2019-12-25 11:18:04', -1, '2019-12-25 11:18:04', NULL, NULL),
(2, 4, 'Quotation To Be Sent', NULL, 1, -1, '2019-12-25 11:18:25', -1, '2019-12-25 11:18:25', NULL, NULL),
(3, 5, 'Quotation Sent', NULL, 1, -1, '2019-12-25 11:18:44', -1, '2019-12-25 11:18:44', NULL, NULL),
(4, 6, 'Sales Order To Be Sent', NULL, 1, -1, '2019-12-25 11:18:55', -1, '2019-12-25 11:18:55', NULL, NULL),
(5, 7, 'Sales Order Sent', NULL, 1, -1, '2019-12-25 11:18:55', -1, '2019-12-25 11:18:55', NULL, NULL),
(6, 8, 'Invoice To Be Sent', NULL, 1, -1, '2019-12-25 11:18:25', -1, '2019-12-25 11:18:25', NULL, NULL),
(7, 9, 'Invoice Sent', 25, 1, -1, '2019-12-25 11:18:44', -1, '2019-12-25 11:18:44', NULL, NULL),
(8, 10, 'Other', NULL, 1, -1, '2019-12-25 11:18:44', -1, '2019-12-25 11:18:44', NULL, NULL),
(9, 1, 'Introduction Meeting', 5, 1, -1, '2020-05-14 01:30:08', -1, '2020-05-14 01:30:08', NULL, NULL),
(10, 3, 'Followup Meeting', 5, 1, -1, '2020-05-14 01:30:08', -1, '2020-05-14 01:30:08', NULL, NULL);

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

--
-- Table structure for table `vendorfunctions`
--

CREATE TABLE `vendorfunctions` (
  `id` int(11) NOT NULL,
  `name` varchar(20) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `vendorfunctions`
--

INSERT INTO `vendorfunctions` (`id`, `name`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Order Acceptance', 1, 1, '2020-04-16 10:25:37', 1, '2020-04-16 10:35:45', NULL, NULL),
(2, 'Packaging', 1, 1, '2020-04-16 10:26:03', 1, '2020-04-16 10:26:03', NULL, NULL),
(3, 'Cross border Courier', 1, 1, '2020-04-16 10:26:20', 1, '2020-04-16 10:26:20', NULL, NULL),
(4, 'Local courier pickup', 1, 1, '2020-04-16 10:36:04', 1, '2020-04-16 10:36:58', -1, '2020-04-16 10:37:56');

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

--
-- Table structure for table `vendors`
--

CREATE TABLE `vendors` (
  `id` int(11) NOT NULL,
  `business_id` int(11) DEFAULT NULL,
  `vendortype_id` int(11) DEFAULT NULL,
  `firstname` varchar(50) DEFAULT NULL,
  `lastname` varchar(50) DEFAULT NULL,
  `companyname` varchar(100) DEFAULT NULL,
  `email` varchar(50) DEFAULT NULL,
  `countryphonecode` varchar(50) DEFAULT NULL,
  `contactno` varchar(20) DEFAULT NULL,
  `address1` text,
  `address2` text,
  `postcode` varchar(20) DEFAULT NULL,
  `city_id` int(11) DEFAULT NULL,
  `state_id` int(11) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `gstnumber` varchar(20) DEFAULT NULL,
  `note` text,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `vendortypes`
--

CREATE TABLE `vendortypes` (
  `id` int(11) NOT NULL,
  `name` varchar(20) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `vendortypes`
--

INSERT INTO `vendortypes` (`id`, `name`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'E commerce', 1, 1, '2020-04-15 13:05:56', 1, '2020-04-15 13:05:56', NULL, NULL),
(2, 'Manufacturer', 1, 1, '2020-04-15 13:07:04', 1, '2020-04-15 14:14:00', NULL, NULL),
(3, 'Trader', 1, 1, '2020-04-15 14:15:01', 1, '2020-04-16 10:23:10', NULL, NULL),
(4, 'Shipping co.', 1, NULL, '2020-04-16 09:35:41', NULL, '2020-04-16 09:36:05', NULL, NULL),
(5, 'Logistics company', 1, 1, '2020-04-16 10:24:48', 1, '2020-04-16 10:24:48', NULL, NULL);

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

--
-- Table structure for table `visitplanningdetails`
--

CREATE TABLE `visitplanningdetails` (
  `id` int(11) NOT NULL,
  `visitplanning_id` int(11) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `city_id` int(11) DEFAULT NULL,
  `visitdate` datetime DEFAULT NULL,
  `customerpotentials` decimal(18,2) DEFAULT NULL,
  `note` text,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `visitplannings`
--

CREATE TABLE `visitplannings` (
  `id` int(11) NOT NULL,
  `business_id` int(11) DEFAULT NULL,
  `month_id` int(11) DEFAULT NULL,
  `year_id` int(11) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `target` varchar(200) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `warehouses`
--

CREATE TABLE `warehouses` (
  `id` int(11) NOT NULL,
  `business_id` int(11) DEFAULT NULL,
  `name` varchar(150) DEFAULT NULL,
  `address1` text,
  `address2` text,
  `city_id` int(11) DEFAULT NULL,
  `state_id` int(11) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `pincode` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT NULL,
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1\r\nif for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1\r\nif for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `warranty`
--

CREATE TABLE `warranty` (
  `id` int(11) NOT NULL,
  `business_id` int(11) DEFAULT NULL,
  `servicecycle_id` int(11) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `title` varchar(50) DEFAULT NULL,
  `referencenumber` varchar(50) DEFAULT NULL,
  `installationdate` datetime DEFAULT NULL,
  `startdate` datetime DEFAULT NULL,
  `enddate` datetime DEFAULT NULL,
  `expirydate` datetime DEFAULT NULL,
  `servicesincluded` text,
  `note` text,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `warrantydetails`
--

CREATE TABLE `warrantydetails` (
  `id` int(11) NOT NULL,
  `warranty_id` int(11) DEFAULT NULL,
  `invoice_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `qty` int(11) DEFAULT NULL,
  `serialnumber` varchar(20) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin	',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin	',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `warrantyservicedetails`
--

CREATE TABLE `warrantyservicedetails` (
  `id` int(11) NOT NULL,
  `warranty_id` int(11) DEFAULT NULL,
  `calendar_id` int(11) DEFAULT NULL,
  `servicestatus_id` int(11) DEFAULT NULL,
  `servicedate` datetime DEFAULT NULL,
  `note` text,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `weekendoff`
--

CREATE TABLE `weekendoff` (
  `id` int(11) NOT NULL,
  `business_id` int(11) DEFAULT NULL,
  `day_id` int(11) DEFAULT NULL,
  `worksite_id` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin	',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin	',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `workingdays`
--

CREATE TABLE `workingdays` (
  `id` int(11) NOT NULL,
  `year_id` int(11) DEFAULT NULL,
  `month_id` varchar(20) DEFAULT NULL,
  `worksite_id` int(11) DEFAULT NULL,
  `days` int(11) DEFAULT NULL,
  `active` tinyint(4) NOT NULL DEFAULT '0',
  `created_by` int(11) NOT NULL DEFAULT '-1',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) NOT NULL DEFAULT '-1',
  `modified_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `workingdaytypes`
--

CREATE TABLE `workingdaytypes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `code` varchar(100) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin	',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1 if for admin	',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `workingdaytypes`
--

INSERT INTO `workingdaytypes` (`id`, `name`, `code`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 'Working Day', 'WORKDAY', 1, -1, '2020-12-26 15:33:55', -1, '2020-12-26 15:33:55', NULL, NULL),
(2, 'Public Holiday', 'PUBHOLIDAY', 1, -1, '2020-12-26 15:33:55', -1, '2020-12-26 15:33:55', NULL, NULL),
(3, 'Weekend Off', 'WEEKENDOFF', 1, -1, '2020-12-26 15:33:55', -1, '2020-12-26 15:33:55', NULL, NULL);

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

--
-- Table structure for table `workitems`
--

CREATE TABLE `workitems` (
  `id` int(11) NOT NULL,
  `unit_id` int(11) DEFAULT NULL,
  `name` varchar(100) DEFAULT NULL,
  `cost` decimal(18,2) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value  -1 for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value  -1 for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `worksites`
--

CREATE TABLE `worksites` (
  `id` int(11) NOT NULL,
  `business_id` int(11) DEFAULT NULL,
  `name` varchar(150) DEFAULT NULL,
  `code` varchar(20) DEFAULT NULL,
  `manager_id` int(11) DEFAULT NULL,
  `address1` text,
  `address2` text,
  `city_id` int(11) DEFAULT NULL,
  `state_id` int(11) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `pincode` int(11) DEFAULT NULL,
  `defaultworksite` tinyint(4) NOT NULL DEFAULT '0',
  `siteallowance` tinyint(4) NOT NULL DEFAULT '0',
  `travelallowance` tinyint(4) NOT NULL DEFAULT '0',
  `workinghours` int(11) DEFAULT NULL,
  `active` tinyint(4) DEFAULT '0',
  `created_by` int(11) DEFAULT '-1' COMMENT 'Default value -1\r\nif for admin',
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) DEFAULT '-1' COMMENT 'Default value -1\r\nif for admin',
  `modified_at` datetime DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` datetime DEFAULT NULL,
  `starttime` time DEFAULT NULL,
  `endtime` time DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `year`
--

CREATE TABLE `year` (
  `id` int(11) NOT NULL,
  `name` int(20) NOT NULL,
  `active` tinyint(11) NOT NULL DEFAULT '0',
  `created_by` int(11) NOT NULL DEFAULT '-1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified_by` int(11) NOT NULL DEFAULT '-1',
  `modified_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `deleted_by` int(11) DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `year`
--

INSERT INTO `year` (`id`, `name`, `active`, `created_by`, `created_at`, `modified_by`, `modified_at`, `deleted_by`, `deleted_at`) VALUES
(1, 2020, 1, -1, '2020-10-02 16:56:09', -1, '2020-10-02 16:56:09', NULL, NULL),
(2, 2021, 1, -1, '2020-10-02 16:56:09', -1, '2020-10-02 16:56:09', NULL, NULL),
(3, 2022, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(4, 2023, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(5, 2024, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(6, 2025, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(7, 2026, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(8, 2027, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(9, 2028, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(10, 2029, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(11, 2030, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(12, 2031, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(13, 2032, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(14, 2033, 1, -1, '2020-10-02 16:58:17', -1, '2020-10-02 16:58:17', NULL, NULL),
(15, 2034, 1, -1, '2020-10-02 16:59:52', -1, '2020-10-02 16:59:52', NULL, NULL),
(16, 2035, 1, -1, '2020-10-02 16:59:52', -1, '2020-10-02 16:59:52', NULL, NULL),
(17, 2036, 1, -1, '2020-10-02 16:59:52', -1, '2020-10-02 16:59:52', NULL, NULL),
(18, 2037, 1, -1, '2020-10-02 16:59:52', -1, '2020-10-02 16:59:52', NULL, NULL),
(19, 2038, 1, -1, '2020-10-02 16:59:52', -1, '2020-10-02 16:59:52', NULL, NULL),
(20, 2039, 1, -1, '2020-10-02 17:00:19', -1, '2020-10-02 17:00:19', NULL, NULL),
(21, 2040, 1, -1, '2020-10-02 17:00:19', -1, '2020-10-02 17:00:19', NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `accountgroups`
--
ALTER TABLE `accountgroups`
  ADD PRIMARY KEY (`id`),
  ADD KEY `business_id` (`business_id`);

--
-- Indexes for table `accounts`
--
ALTER TABLE `accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `accountgroup_id` (`accountgroup_id`),
  ADD KEY `business_id` (`business_id`);

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

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

--
-- Indexes for table `actualvisits`
--
ALTER TABLE `actualvisits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_actualvisits_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `advertisingcosting`
--
ALTER TABLE `advertisingcosting`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_advertisingcosting_leadsources_leadsource_id` (`leadsource_id`);

--
-- Indexes for table `allocationdetails`
--
ALTER TABLE `allocationdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_allocationdetails_allocations_allocation_id` (`allocation_id`),
  ADD KEY `fk_allocationdetails_categories_category_id` (`category_id`),
  ADD KEY `fk_allocationdetails_subcategories_subcategory_id` (`subcategory_id`),
  ADD KEY `fk_allocationdetails_brands_brand_id` (`brand_id`),
  ADD KEY `fk_allocationdetails_sizes_size_id` (`size_id`),
  ADD KEY `fk_allocationdetails_rawmaterial_rawmaterial_id` (`rawmaterial_id`),
  ADD KEY `fk_allocationdetails_business_business_id` (`business_id`);

--
-- Indexes for table `allocations`
--
ALTER TABLE `allocations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_allocations_projects_project_id` (`project_id`),
  ADD KEY `fk_allocations_costcards_costcard_id` (`costcard_id`),
  ADD KEY `fk_allocations_business_business_id` (`business_id`);

--
-- Indexes for table `amc`
--
ALTER TABLE `amc`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_amc_customers_customer_id` (`customer_id`),
  ADD KEY `fk_amc_amcstatus_amcstatus_id` (`amcstatus_id`),
  ADD KEY `fk_amc_businesses_business_id` (`business_id`);

--
-- Indexes for table `amcdetails`
--
ALTER TABLE `amcdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_amcdetails_amc_amc_id` (`amc_id`),
  ADD KEY `fk_amcdetails_products_product_id` (`product_id`);

--
-- Indexes for table `amcservicedetails`
--
ALTER TABLE `amcservicedetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_amcservicedetails_amc_amc_id` (`amc_id`),
  ADD KEY `fk_amcservicedetails_servicestatus_servicestatus_id` (`servicestatus_id`),
  ADD KEY `fk_calendar_calendar_id` (`calendar_id`);

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

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

--
-- Indexes for table `answers`
--
ALTER TABLE `answers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_answers_questionnaire_questionnaire_id` (`questionnaire_id`);

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

--
-- Indexes for table `areacommunicationtypes`
--
ALTER TABLE `areacommunicationtypes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_areacommunicationtypes_modules_module_id` (`module_id`),
  ADD KEY `fk_areacommunicationtypes_areas_area_id` (`area_id`),
  ADD KEY `fk_areacommunicationtypes_communicationtype_communicationtype_id` (`communicationtype_id`);

--
-- Indexes for table `areadocumenttypes`
--
ALTER TABLE `areadocumenttypes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_areadocumenttypes_modules_module_id` (`module_id`),
  ADD KEY `fk_areadocumenttypes_areas_area_id` (`area_id`),
  ADD KEY `fk_areadocumenttypes_documenttype_id` (`documenttype_id`);

--
-- Indexes for table `areaexporttypes`
--
ALTER TABLE `areaexporttypes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_areaexporttype_areas_area_id` (`area_id`),
  ADD KEY `fk_areaexporttypes_exporttypes_exportype_id` (`exporttype_id`),
  ADD KEY `fk_areaexporttypes_modules_module_id` (`module_id`);

--
-- Indexes for table `areas`
--
ALTER TABLE `areas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_areas_applicationtypes_applicationtype_id` (`applicationtype_id`);

--
-- Indexes for table `areasubroutes`
--
ALTER TABLE `areasubroutes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_areasubroutes_modules_module_id` (`module_id`),
  ADD KEY `fk_areasubroutes_areas_area_id` (`area_id`);

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

--
-- Indexes for table `arrears`
--
ALTER TABLE `arrears`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_arrears_employees_employee_id` (`employee_id`),
  ADD KEY `fk_arrears_business_business_id` (`business_id`);

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

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

--
-- Indexes for table `assignmenthistory`
--
ALTER TABLE `assignmenthistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_assignmenthistory_users_user_id` (`user_id`),
  ADD KEY `fk_assignmenthistory_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `authorizedarearolepermissions`
--
ALTER TABLE `authorizedarearolepermissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_accessarearolepermission_roles_role_id` (`role_id`),
  ADD KEY `fk_accessrolepermissions_permissions_permission_id` (`permission_id`),
  ADD KEY `fk_accessrolepermissions_accessarea_accessarea_id` (`area_id`);

--
-- Indexes for table `authorizedbusinessrolepermissions`
--
ALTER TABLE `authorizedbusinessrolepermissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_authorizedbusinessrolepermissions_businesses_business_id` (`business_id`),
  ADD KEY `fk_authorizedbusinessrolepermissions_roles_role_id` (`role_id`),
  ADD KEY `fk_authorizedbusinessrolepermissions_users_user_id` (`user_id`),
  ADD KEY `fk_authorizedbusinessrolepermissions_permissions_permission_id` (`permission_id`) USING BTREE;

--
-- Indexes for table `bcpurchaseordercommunicationhistory`
--
ALTER TABLE `bcpurchaseordercommunicationhistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_bcpocomhistory_communicationtype_communicationtype_id` (`communicationtype_id`),
  ADD KEY `fk_bcpocomhistory_bcpurchaseorders_bcpurchaseorders_id` (`businessconsultingpurchaseorders_id`),
  ADD KEY `fk_bcpocomhistory_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `billofquantities`
--
ALTER TABLE `billofquantities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_billofquantities_customers_customer_id` (`customer_id`),
  ADD KEY `fk_billofquantities_businesses_business_id` (`business_id`);

--
-- Indexes for table `billofquantitiesdocuments`
--
ALTER TABLE `billofquantitiesdocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_billofquantitiesdocuments_billofquantities_billofquantity_id` (`billofquantity_id`);

--
-- Indexes for table `billofquantitiesrawmaterials`
--
ALTER TABLE `billofquantitiesrawmaterials`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_bilofqtyrmtls_rowmaterials_rowmaterial_id` (`rowmaterial_id`),
  ADD KEY `fk_bilofqtyrmtls_billofquantities_billofquantity_id` (`billofquantity_id`);

--
-- Indexes for table `billofquantityconfigurations`
--
ALTER TABLE `billofquantityconfigurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_boqconfigurations_billofquantities_billofquantity_id` (`billofquantity_id`);

--
-- Indexes for table `billofquantitydetails`
--
ALTER TABLE `billofquantitydetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_billofquantitydetails_billofquantities_billofquantity_id` (`billofquantity_id`);

--
-- Indexes for table `billtypes`
--
ALTER TABLE `billtypes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_billtypes_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `bonus`
--
ALTER TABLE `bonus`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fK_bonus_skilledcategory_skillcategory_id` (`skilledcategory_id`),
  ADD KEY `fk_bonus_year_year_id` (`year_id`),
  ADD KEY `fk_bonus_months_month_id` (`month_id`),
  ADD KEY `fk_bonus_worksites_worksite_id` (`worksite_id`),
  ADD KEY `fk_bonus_bonustypes_bonustype_id` (`bonustype_id`),
  ADD KEY `fk_bonus_business_business_id` (`business_id`);

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

--
-- Indexes for table `bookings`
--
ALTER TABLE `bookings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_bookings_cities_fromcity_id` (`fromcity_id`),
  ADD KEY `fk_bookings_cities_tocity_id` (`tocity_id`),
  ADD KEY `fk_bookings_claimstatus_claimstatus_id` (`claimstatus_id`),
  ADD KEY `fk_bookings_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `branchlocation`
--
ALTER TABLE `branchlocation`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_branchlocation_employees_employee_id` (`employer_id`);

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

--
-- Indexes for table `businessaddresses`
--
ALTER TABLE `businessaddresses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employeraddresses_addresstypes_addresstype_id` (`addresstype_id`),
  ADD KEY `fk_employeraddresses_employer_employer_id` (`employer_id`),
  ADD KEY `business_id` (`business_id`);

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

--
-- Indexes for table `businessdocuments`
--
ALTER TABLE `businessdocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_businessdocuments_businesses_business_id` (`business_id`),
  ADD KEY `fk_businessdocuments_documenttypes_documenttype_id` (`documenttype_id`);

--
-- Indexes for table `businesses`
--
ALTER TABLE `businesses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_businesses_countries_country_id` (`country_id`),
  ADD KEY `fk_businesses_states_state_id` (`state_id`),
  ADD KEY `fk_businesses_cities_city_id` (`city_id`),
  ADD KEY `fk_businesses_currencies_currency_id` (`currency_id`);

--
-- Indexes for table `businessplan`
--
ALTER TABLE `businessplan`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_businessplan_businesses_business_id` (`business_id`),
  ADD KEY `fk_businessplan_employees_employee_id` (`employee_id`),
  ADD KEY `fk_businessplan_financialyears_financialyear_id` (`financialyear_id`);

--
-- Indexes for table `businessplandetails`
--
ALTER TABLE `businessplandetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_businessplandetails_businessplan_businessplan_id` (`businessplan_id`),
  ADD KEY `fk_businessplandetails_customers_customer_id` (`customer_id`);

--
-- Indexes for table `businessplantargets`
--
ALTER TABLE `businessplantargets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_businessplantargets_businessplandetails_businessplandetail_id` (`businessplandetail_id`),
  ADD KEY `fk_businessplantargets_months_month_id` (`month_id`),
  ADD KEY `fk_businessplantargets_year_year_id` (`year_id`);

--
-- Indexes for table `calendar`
--
ALTER TABLE `calendar`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_calendar_employees_employee_id` (`from_id`);

--
-- Indexes for table `cancelledserialnumbers`
--
ALTER TABLE `cancelledserialnumbers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_serialnumber_billtypes_billtype_id` (`billtype_id`),
  ADD KEY `fk_serialnumber_months_month_id` (`month_id`) USING BTREE,
  ADD KEY `fk_serialnumber_years_year_id` (`year_id`) USING BTREE;

--
-- Indexes for table `candidatecommunicationhistory`
--
ALTER TABLE `candidatecommunicationhistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_candidatecomhistry_candidatecomtype_candidatecomtype_id` (`candidatecommunicationtype_id`);

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

--
-- Indexes for table `candidatejobopenings`
--
ALTER TABLE `candidatejobopenings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_candidates_jobs_id_job_id` (`jobopening_id`),
  ADD KEY `fk_candidatejobopening_calendar_calender_id` (`calendar_id`),
  ADD KEY `fk_candidatejobopening_interviewtypes_interviewtype_id` (`interviewtype_id`);

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

--
-- Indexes for table `candidatemcqanswers`
--
ALTER TABLE `candidatemcqanswers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_candidatemcq_candidates_candidate_id` (`candidate_id`),
  ADD KEY `fk_candidatemcqanswer_answers_answer_id` (`answers_id`),
  ADD KEY `fk_candidatemcq_mcqquestionnaire_mcqquestionnaire_id` (`questionnaire_id`);

--
-- Indexes for table `candidatepastexperience`
--
ALTER TABLE `candidatepastexperience`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_candidatepastexperience_candidates_candidate_id` (`candidate_id`);

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

--
-- Indexes for table `candidates`
--
ALTER TABLE `candidates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_candidates_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `cashmemodetails`
--
ALTER TABLE `cashmemodetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_cashmemodetails_businesses_businesses_id` (`business_id`),
  ADD KEY `fk_cashmemodetails_cashmemo_cashmemo_id` (`cashmemo_id`);

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

--
-- Indexes for table `cashmemos`
--
ALTER TABLE `cashmemos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_cashmemo_employee_employee_id` (`employee_id`),
  ADD KEY `fk_cashmemo_businesses_business_id` (`business_id`),
  ADD KEY `fk_cashmemo_customer_customer_id` (`customer_id`),
  ADD KEY `fk_cashmemo_invoicetype_invoicetype_id` (`invoicetype_id`);

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

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

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

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

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

--
-- Indexes for table `commissionconfigurations`
--
ALTER TABLE `commissionconfigurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_commissionconfigurations_businesses_business_id` (`business_id`);

--
-- Indexes for table `commissions`
--
ALTER TABLE `commissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_commissions_invoices_invoice_id` (`invoice_id`),
  ADD KEY `fk_commissions_partners_partner_id` (`partner_id`),
  ADD KEY `fk_commissions_businesses_business_id` (`business_id`);

--
-- Indexes for table `communicationhistory`
--
ALTER TABLE `communicationhistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_communicationhistory_communicationtype_communicationtype_id` (`communicationtype_id`),
  ADD KEY `fk_communicationhistory_caledar_calendar_id` (`calendar_id`),
  ADD KEY `fk_communicationhistory_employees_employee_id` (`employee_id`),
  ADD KEY `fk_communicationhistory_businesses_business_id` (`business_id`);

--
-- Indexes for table `communicationhistoryaudit`
--
ALTER TABLE `communicationhistoryaudit`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_communicationhistoryaudit_communicationhistory_id` (`communicationhistory_id`);

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

--
-- Indexes for table `communicationtype`
--
ALTER TABLE `communicationtype`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_communicationtype_comtypegroups_comtypegroup_id` (`communicationtypegroup_id`);

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

--
-- Indexes for table `companygoals`
--
ALTER TABLE `companygoals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_companygoals_department_department_id` (`department_id`);

--
-- Indexes for table `companygoalsdetails`
--
ALTER TABLE `companygoalsdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_companygoalsdetails__companygoals_companygoal_id` (`companygoal_id`),
  ADD KEY `fk_companygoalsdetails_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `complaintdocuments`
--
ALTER TABLE `complaintdocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_complaintdocuments_complaints_complaint_id` (`complaint_id`),
  ADD KEY `fk_complaintdocuments_documenttypes_documenttype_id` (`documenttype_id`);

--
-- Indexes for table `complaintfeedbackanswers`
--
ALTER TABLE `complaintfeedbackanswers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_complaintfeedbackanswers_answers_answer_id` (`answer_id`);

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

--
-- Indexes for table `complaintproductdetails`
--
ALTER TABLE `complaintproductdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `complaint_id` (`complaint_id`),
  ADD KEY `product_id` (`product_id`);

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

--
-- Indexes for table `complaints`
--
ALTER TABLE `complaints`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_complaints_compalintstatus_status_id` (`complaintstatus_id`),
  ADD KEY `fk_complaints_complainttypes_complainttype_id` (`complainttype_id`),
  ADD KEY `fk_complaints_calendar_calendar_id` (`calendar_id`),
  ADD KEY `fk_complaints_complaintpaymentstatus_complaintpaymentstatus_id` (`complaintpaymentstatus_id`),
  ADD KEY `fk_complaints_invoicetypes_invoicetype_id` (`invoicetype_id`),
  ADD KEY `fk_complaints_businesses_business_id` (`business_id`);

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `costcarddetails`
--
ALTER TABLE `costcarddetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_costcarddetails_costcards_costcard_id` (`costcard_id`),
  ADD KEY `fk_costcarddetails_categories_category_id` (`category_id`),
  ADD KEY `fk_costcarddetails_brands_brand_id` (`brand_id`),
  ADD KEY `fk_costcarddetails_subcategories_subcategories_id` (`subcategory_id`),
  ADD KEY `fk_costcarddetails_sizes_size_id` (`size_id`),
  ADD KEY `fk_costcarddetails_rawmaterial_rawmaterial_id` (`rawmaterial_id`),
  ADD KEY `fk_costcarddetails_business_business_id` (`business_id`);

--
-- Indexes for table `costcards`
--
ALTER TABLE `costcards`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_costcards_business_business_id` (`business_id`);

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

--
-- Indexes for table `courieres`
--
ALTER TABLE `courieres`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_courieres_businesses_business_id` (`business_id`),
  ADD KEY `fk_courieres_paymentstatus_paymentstatus_id` (`paymentstatus_id`);

--
-- Indexes for table `creditnotedetails`
--
ALTER TABLE `creditnotedetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_creditnotedetails_creditnotes_creditnote_id` (`creditnote_id`),
  ADD KEY `fk_creditnotedetails_gstslabs_gstslab_id` (`gstslab_id`),
  ADD KEY `fk_creditnotedetails_products_product_id` (`product_id`);

--
-- Indexes for table `creditnotes`
--
ALTER TABLE `creditnotes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_creditnotes_creditnotestatus_status_id` (`status_id`),
  ADD KEY `fk_creditnotes_customers_customer_id` (`customer_id`),
  ADD KEY `fk_creditnotes_invoices_invoice_id` (`invoice_id`);

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

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

--
-- Indexes for table `customeraddresses`
--
ALTER TABLE `customeraddresses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_customeraddresses_customers_customer_id` (`customer_id`),
  ADD KEY `fk_customeraddresses_addresstypes_addresstype_id` (`addresstype_id`);

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

--
-- Indexes for table `customercommunicationlogs`
--
ALTER TABLE `customercommunicationlogs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_communicationmodes_communicationmode_id` (`communicationmode_id`),
  ADD KEY `fk_templates_templatetype_id` (`templatetype_id`),
  ADD KEY `fk_customercommunicationtypes_customercommunicationtype_id` (`customercommunicationtype_id`);

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

--
-- Indexes for table `customerdocuments`
--
ALTER TABLE `customerdocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_customerdocuments_customers_customer_id` (`customer_id`),
  ADD KEY `fk_customerdocuments_documenttypes_documenttype_id` (`documenttype_id`);

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

--
-- Indexes for table `customerproductcategories`
--
ALTER TABLE `customerproductcategories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_customerproductcategories_customers_customer_id` (`customer_id`),
  ADD KEY `fk_customerproductcategories_categories_category_id` (`category_id`);

--
-- Indexes for table `customerquestionnaire`
--
ALTER TABLE `customerquestionnaire`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_customerquestionnaire_customers_customer_id` (`customer_id`),
  ADD KEY `fk_customerquestionnaire_leadquestionnaire_leadquestionnaire_id` (`leadquestionnaire_id`);

--
-- Indexes for table `customers`
--
ALTER TABLE `customers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_customers_producttypes_producttype_id` (`category_id`),
  ADD KEY `fk_customers_leadsources_leadsource_id` (`leadsource_id`),
  ADD KEY `fk_customers_contacttypes_contacttype_id` (`designation_id`),
  ADD KEY `fk_customers_customertypes_customertype_id` (`customertype_id`),
  ADD KEY `fk_customers_customerstatus_customerstatus_id` (`customerstatus_id`),
  ADD KEY `fk_customers_businesses_business_id` (`business_id`),
  ADD KEY `fk_customers_partners_partner_id` (`partner_id`);

--
-- Indexes for table `customersocialmedia`
--
ALTER TABLE `customersocialmedia`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_customersocialmedia_customers_customer_id` (`customer_id`);

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

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

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

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

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

--
-- Indexes for table `debitnotedetails`
--
ALTER TABLE `debitnotedetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_debitnotedetails_debitnotes_debitnote_id` (`debitnote_id`),
  ADD KEY `fk_debitnotedetails_products_product_id` (`rawmaterial_id`),
  ADD KEY `fk_debitnotedetails_gstslabs_gstslab_id` (`gstslab_id`);

--
-- Indexes for table `debitnotes`
--
ALTER TABLE `debitnotes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_debitnotes_customers_customer_id` (`customer_id`),
  ADD KEY `fk_debitnotes_creditnotestatus_status_id` (`status_id`);

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

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

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

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

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

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

--
-- Indexes for table `directors`
--
ALTER TABLE `directors`
  ADD PRIMARY KEY (`id`),
  ADD KEY `business_id` (`business_id`);

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

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

--
-- Indexes for table `employeebankdetails`
--
ALTER TABLE `employeebankdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employeebankdetails_employees_employee_id` (`employee_id`);

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

--
-- Indexes for table `employeedocuments`
--
ALTER TABLE `employeedocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employeedocuments_employees_employee_id` (`employee_id`);

--
-- Indexes for table `employeefamilydetails`
--
ALTER TABLE `employeefamilydetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employeefamilydetails_employees_employee_id` (`employee_id`),
  ADD KEY `fk_employeefamilydetails_relationships_relationship_id` (`relationship_id`);

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

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

--
-- Indexes for table `employeeofficialdetails`
--
ALTER TABLE `employeeofficialdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employeeofficaildetails_employees_employee_id` (`employee_id`),
  ADD KEY `fk_employeeofficaildetails_departments_department_id` (`department_id`),
  ADD KEY `fk_employeeofficialdetails_skilledcategory_id` (`skilledcategory_id`),
  ADD KEY `fk_employeeofficialdetails_employeetypes_employeetype_id` (`employeetype_id`),
  ADD KEY `fk_employeeofficialdetails_worksites_worksite_id` (`worksite_id`),
  ADD KEY `fk_employeeofficialdetails_jobtitles_jobtitle_id` (`jobtitle_id`),
  ADD KEY `fk_employeeofficialdetails_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `employeepayrolldetails`
--
ALTER TABLE `employeepayrolldetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employeepayrolldetails_employees_employee_id` (`employee_id`),
  ADD KEY `fk_employeepayrolldetails_payouttypes_payouttype_id` (`payouttype_id`),
  ADD KEY `fk_employeepayrolldetails_payrollstatus_status_id` (`status_id`);

--
-- Indexes for table `employees`
--
ALTER TABLE `employees`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employees_bloodgroups_bloodgroup_id` (`bloodgroup_id`),
  ADD KEY `fk_employees_boilersuitesizes_boilersuitesize_id` (`boilersuitsize_id`),
  ADD KEY `fk_employees_safetyshoessizes_safetyshoessize_id` (`safetyshoessize_id`),
  ADD KEY `fk_employees_businesses_business_id` (`business_id`);

--
-- Indexes for table `employeetrainings`
--
ALTER TABLE `employeetrainings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employeetrainings_employees_employee_id` (`employee_id`),
  ADD KEY `fk_employeetrainings_training_id` (`training_id`),
  ADD KEY `fk_employeetrainings_users_user_id` (`user_id`),
  ADD KEY `fk_employeetrainings_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `employerconfigurations`
--
ALTER TABLE `employerconfigurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employerconfigurations_busineess_business_id` (`business_id`);

--
-- Indexes for table `enquiries`
--
ALTER TABLE `enquiries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_enquiries_leadsources_leadsource_id` (`leadsource_id`),
  ADD KEY `fk_enquiries_cities_city_id` (`city_id`),
  ADD KEY `fk_enquiries_enquirytypes_enquirytype_id` (`enquirytype_id`),
  ADD KEY `fk_enquiries_enquirystatus_enquirystatus_id` (`enquirystatus_id`),
  ADD KEY `fk_enquiries_customers_client_id` (`client_id`),
  ADD KEY `fk_enquiries_products_product_id` (`product_id`),
  ADD KEY `fk_enquiries_countries_country_id` (`country_id`),
  ADD KEY `fk_enquiries_states_state_id` (`state_id`),
  ADD KEY `fk_enquiries_businesses_business_id` (`business_id`),
  ADD KEY `fk_enquiries_customertypes_customertype_id` (`customertype_id`),
  ADD KEY `fk_enquiries_months_month_id` (`month_id`),
  ADD KEY `fk_enquiries_year_year_id` (`year_id`),
  ADD KEY `fk_enquiries_customeraddresses_address_id` (`address_id`);

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

--
-- Indexes for table `enquirycommunicationhistory`
--
ALTER TABLE `enquirycommunicationhistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_enquirycommunicationhistory_commutype_communicationtype_id` (`communicationtype_id`);

--
-- Indexes for table `enquirydetails`
--
ALTER TABLE `enquirydetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_enquirydetails_enquiry_enquiry_id` (`enquiry_id`),
  ADD KEY `fk_enquirydetails_products_product_id` (`product_id`);

--
-- Indexes for table `enquirydocuments`
--
ALTER TABLE `enquirydocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_enquirydocuments_enquiries_enquiry_id` (`enquiry_id`),
  ADD KEY `fk_enquirydocuments_documenttypes_documenttype_id` (`documenttype_id`);

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

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

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

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

--
-- Indexes for table `ewaybill`
--
ALTER TABLE `ewaybill`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ewaybill_invoices_invoice_id` (`invoice_id`),
  ADD KEY `ewaybill_transactionsubtypes_transactionsubtype_id` (`transactionsubtype_id`),
  ADD KEY `ewaybill_vehicletypes_vehicletype_id` (`vehicletype_id`),
  ADD KEY `ewaybill_transportationtypes_transportation_id` (`transportationtype_id`);

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

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

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

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

--
-- Indexes for table `feedbackquestions`
--
ALTER TABLE `feedbackquestions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_feedbackquestions_controltypes_controltype_id` (`controltype_id`);

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

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

--
-- Indexes for table `foodallowances`
--
ALTER TABLE `foodallowances`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fK_foodallowances_skilledcategory_skillcategory_id` (`skillcategory_id`),
  ADD KEY `fK_foodallowances_worksites_worksite_id` (`worksite_id`);

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

--
-- Indexes for table `goals`
--
ALTER TABLE `goals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `goals_department_id_departments_id` (`department_id`);

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

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

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

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

--
-- Indexes for table `incentives`
--
ALTER TABLE `incentives`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_incentives_employees_employee_id` (`employee_id`),
  ADD KEY `fk_incentives_business_business_id` (`business_id`);

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

--
-- Indexes for table `incidents`
--
ALTER TABLE `incidents`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_incidents_business_business_id` (`business_id`);

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

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

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

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

--
-- Indexes for table `invoiceadditionalcharges`
--
ALTER TABLE `invoiceadditionalcharges`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_invadditionalcharges_invoice_invoice_id` (`invoice_id`),
  ADD KEY `fk_invadditionalcharges_chargetypes_chargetype_id` (`chargetype_id`);

--
-- Indexes for table `invoiceconfigurations`
--
ALTER TABLE `invoiceconfigurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_invoiceconfigurations_invoices_invoice_id` (`invoice_id`);

--
-- Indexes for table `invoicedetails`
--
ALTER TABLE `invoicedetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_invoicedetails_invoices_invoice_id` (`invoice_id`),
  ADD KEY `fk_invoicedetails_products_product_id` (`product_id`),
  ADD KEY `fk_invoicedetails_gstslabs_gstslab_id` (`gstslab_id`),
  ADD KEY `fk_invoicedetails_businesses_business_id` (`business_id`);

--
-- Indexes for table `invoicedocuments`
--
ALTER TABLE `invoicedocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_invoicedocuments_invoices_invoice_id` (`invoice_id`);

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

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

--
-- Indexes for table `invoices`
--
ALTER TABLE `invoices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_invoices_customer_id_customers` (`customer_id`),
  ADD KEY `fk_invoices_invoicetypes_invoicetype_id` (`invoicetype_id`),
  ADD KEY `fk_invoices_invpaymentstatus_invoicepaymentstatus_id` (`invoicepaymentstatus_id`),
  ADD KEY `fk_invoices_invoicereferencetypes_invoicereferencetype_id` (`invoicereferencetype_id`),
  ADD KEY `fk_invoices_businesses_business_id` (`business_id`),
  ADD KEY `fk_invoices_invoicestatus_invoicestatus_id` (`invoicestatus_id`);

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

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

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

--
-- Indexes for table `issues`
--
ALTER TABLE `issues`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_issues_task_id_tasks_id` (`task_id`),
  ADD KEY `fk_issues_issuestatus_issuestatus_id` (`issuestatus_id`),
  ADD KEY `fk_issues_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `jobkpis`
--
ALTER TABLE `jobkpis`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_job_jobkpi_id_idx` (`job_id`),
  ADD KEY `fk_kpi_jobkpi_id_idx` (`kpi_id`);

--
-- Indexes for table `jobkras`
--
ALTER TABLE `jobkras`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_job_jobkras_id_idx` (`job_id`),
  ADD KEY `fk_kra_jobkras_id_idx` (`kra_id`);

--
-- Indexes for table `jobopeningassignmenthistory`
--
ALTER TABLE `jobopeningassignmenthistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_jobassignmenthistory_jobopenings_jobopening_id` (`jobopening_id`);

--
-- Indexes for table `jobopeningcommunicationhistory`
--
ALTER TABLE `jobopeningcommunicationhistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_jobopeningcommunicationhistory_jobopenings_jobopening_id` (`jobopening_id`),
  ADD KEY `fk_communicationhistory_communicationtype_commtype_id` (`jobopeningcommunicationtype_id`);

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

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

--
-- Indexes for table `jobopeningskills`
--
ALTER TABLE `jobopeningskills`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_jobopeningskills_skills_skill_id` (`skill_id`),
  ADD KEY `fk_jobopeningskills_jobopening_jobopening_id` (`jobopening_id`);

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

--
-- Indexes for table `jobplannings`
--
ALTER TABLE `jobplannings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_jobplannings_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `jobplanningworkflowdetails`
--
ALTER TABLE `jobplanningworkflowdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobworkflowdetails_joblainning_jobplanning_id` (`jobplanning_id`),
  ADD KEY `jobworkflowdetails_jobplanningworkflow_jobplanningworkflow_id` (`jobplanningworkflow_id`),
  ADD KEY `jobworkflowdetails_jobplanningworkflowstatus_jobplaningstatus_id` (`jobplanningworkflowstatus_id`);

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

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

--
-- Indexes for table `jobtitles`
--
ALTER TABLE `jobtitles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fK_jobtitle_skilledcategory_skillcategory_id` (`skillcategory_id`);

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

--
-- Indexes for table `jobworkdocuments`
--
ALTER TABLE `jobworkdocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobwork_id` (`jobwork_id`),
  ADD KEY `fk_jobworkdocuments_documenttypes_documenttype_id` (`documenttype_id`);

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

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

--
-- Indexes for table `jobworks`
--
ALTER TABLE `jobworks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_crmjobs_customers_customer_id` (`customer_id`),
  ADD KEY `fk_jobworks_servicetypes_servicetype_id` (`servicetype_id`),
  ADD KEY `fk_jobworks_jobworktypes_jobworktype_id` (`jobworktype_id`),
  ADD KEY `fk_jobworks_jobworkpaymentstatus_jobworkpaymentstatus_id` (`jobworkpaymentstatus_id`),
  ADD KEY `fk_jobworks_calendar_calendar_id` (`calendar_id`),
  ADD KEY `fk_jobworks_businesses_business_id` (`business_id`);

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

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

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

--
-- Indexes for table `kpi`
--
ALTER TABLE `kpi`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_kpi_departments_department_id` (`department_id`),
  ADD KEY `fk_kpi_roles_role_id` (`role_id`);

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

--
-- Indexes for table `leadqualificationanswers`
--
ALTER TABLE `leadqualificationanswers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_customerleadqualification_answers_answers_id` (`answer_id`),
  ADD KEY `fk_customerleadqualification_questionnaire_questionnaire_id` (`questionnaire_id`),
  ADD KEY `fk_customerleadqualification_customers_customer_id` (`customer_id`);

--
-- Indexes for table `leadsources`
--
ALTER TABLE `leadsources`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_leadsources_businesses_business_id` (`business_id`);

--
-- Indexes for table `leaveapplication`
--
ALTER TABLE `leaveapplication`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_leaveapplication_business_business_id` (`business_id`);

--
-- Indexes for table `leaveapplicationdetails`
--
ALTER TABLE `leaveapplicationdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_leavedetails_leaveapplication_leaveapplication_id` (`leaveapplication_id`);

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

--
-- Indexes for table `loanrepayments`
--
ALTER TABLE `loanrepayments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_loanrepayments_loans_loan_id` (`loan_id`);

--
-- Indexes for table `loans`
--
ALTER TABLE `loans`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_loans_business_business_id` (`business_id`);

--
-- Indexes for table `loanschedules`
--
ALTER TABLE `loanschedules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_loanschedules_loans_loan_id` (`loan_id`),
  ADD KEY `fk_loanschedules_loanschedulestatus_loanschedulestatus_id` (`loanschedulestatus_id`);

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

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

--
-- Indexes for table `logisticsdetails`
--
ALTER TABLE `logisticsdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_logisticsdetails_salesorder_salesorder_id` (`salesorder_id`),
  ADD KEY `fk_logisticsdetails_logisticspaymentstatus_id` (`paymentstatus_id`),
  ADD KEY `fk_logisticsdetails_business_business_id` (`business_id`);

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

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

--
-- Indexes for table `lwfsettings`
--
ALTER TABLE `lwfsettings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fK_lwfsettings_year_payout_year_id` (`year_id`),
  ADD KEY `fk_lwfsettings_months_payout_month_id` (`month_id`);

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

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

--
-- Indexes for table `mcqanswers`
--
ALTER TABLE `mcqanswers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_mcqanswers_mcqquestionnaire_mcqquestionnaire_id` (`mcqquestionnaire_id`);

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

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

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

--
-- Indexes for table `moduleareas`
--
ALTER TABLE `moduleareas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_moduleareas_modules_module_id` (`module_id`),
  ADD KEY `fk_modulearea_areas_area_id` (`area_id`);

--
-- Indexes for table `modules`
--
ALTER TABLE `modules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_modules_applicationtypes_applicationtype_id` (`applicationtype_id`);

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

--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_notifications_employees_employee_id` (`employee_id`);

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

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

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

--
-- Indexes for table `orderworkflowdetails`
--
ALTER TABLE `orderworkflowdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`reference_id`),
  ADD KEY `orderworkflow_id` (`orderworkflow_id`),
  ADD KEY `orderworkflowstatus_id` (`orderworkflowstatus_id`);

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

--
-- Indexes for table `orientation`
--
ALTER TABLE `orientation`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_orientation_departments_department_id` (`department_id`);

--
-- Indexes for table `orientationanswers`
--
ALTER TABLE `orientationanswers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_orientationanswers_orientationquestionnaire_questionnaire_id` (`orientationquestionnaire_id`);

--
-- Indexes for table `orientationquestionnaire`
--
ALTER TABLE `orientationquestionnaire`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_orientationquestionnarie_orienatation_orientation_id` (`orientation_id`);

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

--
-- Indexes for table `overheadcost`
--
ALTER TABLE `overheadcost`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_overheadcost_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `partneraddresses`
--
ALTER TABLE `partneraddresses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_partneraddresses_addresstypes_addresstype_id` (`addresstype_id`),
  ADD KEY `fk_partneraddresses_partners_partner_id` (`partner_id`);

--
-- Indexes for table `partneranswers`
--
ALTER TABLE `partneranswers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_partneranswers_partnerquestionnaire_partnerquestionnaire_id` (`partnerquestionnaire_id`),
  ADD KEY `fk_partneranswers_partners_partner_id` (`partner_id`);

--
-- Indexes for table `partnerbankdetails`
--
ALTER TABLE `partnerbankdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_partnerbankdetails_partners_partner_id` (`partner_id`);

--
-- Indexes for table `partnercommunicationhistory`
--
ALTER TABLE `partnercommunicationhistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_partnercommunicationhistory_partners_partner_id` (`partner_id`),
  ADD KEY `fk_comhistory_comtype_comtype_id` (`partnercommunicationtype_id`) USING BTREE,
  ADD KEY `fk_partnercommunicationhistory_calendar_calendar_id` (`calendar_id`);

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

--
-- Indexes for table `partnerdocuments`
--
ALTER TABLE `partnerdocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_partnerdocuments_partners_partner_id` (`partner_id`);

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

--
-- Indexes for table `partnerreferrals`
--
ALTER TABLE `partnerreferrals`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_partnerreferrals_partners_partner_id` (`partner_id`);

--
-- Indexes for table `partners`
--
ALTER TABLE `partners`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_partners_employees_employee_id` (`employee_id`),
  ADD KEY `fk_partners_partnerstatus_status_id` (`partnerstatus_id`),
  ADD KEY `fk_partners_partnertypes_partnertype_id` (`partnertype_id`);

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

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

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

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

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

--
-- Indexes for table `payments`
--
ALTER TABLE `payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_payments_paymentmodes_paymentmode_id` (`paymentmode_id`),
  ADD KEY `fk_payments_invoicetypes_invoicetype_id` (`invoicetype_id`),
  ADD KEY `fk_payments_businesses_business_id` (`business_id`),
  ADD KEY `fk_payments_employees_employee_id` (`employee_id`);

--
-- Indexes for table `paymentslip`
--
ALTER TABLE `paymentslip`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_paymentslip_customers_customer_id` (`customer_id`),
  ADD KEY `fk_paymentslip_paymentcycle_paymentcycle_id` (`paymentcycle_id`),
  ADD KEY `fk_paymentslip_paymentslipstatus_paymentslipstatus_id` (`paymentslipstatus_id`);

--
-- Indexes for table `paymentslipconfigurations`
--
ALTER TABLE `paymentslipconfigurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_paymentslipconfigurations_paymentslip_paymentslip_id` (`paymentslip_id`);

--
-- Indexes for table `paymentslipdetails`
--
ALTER TABLE `paymentslipdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_paymentslip_usertype_usertype_id` (`usertype_id`),
  ADD KEY `fk_paymentslipdetails_gstslabs_gstslabs_id` (`gstslabs_id`),
  ADD KEY `fk_paymentslipdetails_paymentslip_paymentslip_id` (`paymentslip_id`) USING BTREE;

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

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

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

--
-- Indexes for table `payrolllogs`
--
ALTER TABLE `payrolllogs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_payrolllogs_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `payslip`
--
ALTER TABLE `payslip`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_payslip_employees_employee_id` (`employee_id`),
  ADD KEY `fk_payslip_worksites_worksite_id` (`worksite_id`),
  ADD KEY `fk_payslip_payslipstatus_payslipstatus_id` (`payslipstatus_id`);

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

--
-- Indexes for table `performancekpi`
--
ALTER TABLE `performancekpi`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_performancekpi_employees_employee_id` (`employee_id`),
  ADD KEY `fk_performancekpi_users_user_id` (`user_id`);

--
-- Indexes for table `performancekpidetails`
--
ALTER TABLE `performancekpidetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_kpidetails_performancekpi_id_performance_id` (`performancekpi_id`),
  ADD KEY `fk_kpidetails_kpi_kpi_id` (`kpi_id`),
  ADD KEY `fk_performancekpidetails_businesses_business_id` (`business_id`);

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

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

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

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

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

--
-- Indexes for table `processingcenterlogs`
--
ALTER TABLE `processingcenterlogs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `processingcenterlogs_businesses_business_id` (`business_id`);

--
-- Indexes for table `procurementdetails`
--
ALTER TABLE `procurementdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_procurementdetails_procurements_procurement_id` (`procurement_id`);

--
-- Indexes for table `procurements`
--
ALTER TABLE `procurements`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_procurements_procurementstatus_procurementstatus_id` (`procurementstatus_id`);

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

--
-- Indexes for table `productinventory`
--
ALTER TABLE `productinventory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_inventory_products_product_id` (`product_id`),
  ADD KEY `fk_productinventory_businesses_business_id` (`business_id`);

--
-- Indexes for table `productinventorystockin`
--
ALTER TABLE `productinventorystockin`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_inventorystockin_products_product_id` (`product_id`),
  ADD KEY `fk_productinventorystockin_suppliers_supplier_id` (`supplier_id`),
  ADD KEY `fk_productinventorystockin_warehouses_warehouse_id` (`warehouse_id`),
  ADD KEY `fk_productinventorystockin_businesses_business_id` (`business_id`),
  ADD KEY `fk_productinventorystockin_inventorystatus_inventorystatus_id` (`inventorystatus_id`);

--
-- Indexes for table `productinventorystockout`
--
ALTER TABLE `productinventorystockout`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_inventorystockout_products_product_id` (`product_id`),
  ADD KEY `fk_prodinvstockout_prodinvstockin_prodinvstockin_id` (`inventorystockin_id`) USING BTREE,
  ADD KEY `fk_productinventorystockout_businesses_business_id` (`business_id`),
  ADD KEY `fk_productinventorystockout_referencetypes_referencetype_id` (`orderreferencetype_id`);

--
-- Indexes for table `productionplanning`
--
ALTER TABLE `productionplanning`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_productionplanning_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `productpurchaseorderdetails`
--
ALTER TABLE `productpurchaseorderdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_purchasedetails_purchaseorders_purchaseorder_id` (`productpurchaseorder_id`),
  ADD KEY `fk_purchasedetails_products_product_id` (`product_id`);

--
-- Indexes for table `productpurchaseorders`
--
ALTER TABLE `productpurchaseorders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_purchaseorders_salesorder_salesorder_id` (`salesorder_id`) USING BTREE,
  ADD KEY `fk_purchaseorders_suppliers_supplier_id` (`supplier_id`),
  ADD KEY `fk_purchaseorders_purchaseorderstatus_status_id` (`status_id`),
  ADD KEY `fk_productpurchaseorders_businesses_business_id` (`business_id`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_products_categories_category_id` (`category_id`),
  ADD KEY `fk_products_businesses_business_id` (`business_id`),
  ADD KEY `fk_products_measurementtypes_measurementtype_id` (`measurementtype_id`);

--
-- Indexes for table `productstockadjustment`
--
ALTER TABLE `productstockadjustment`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_stockadjustment_adjustmenttype_adjustmenttype_ide` (`adjustmenttype_id`);

--
-- Indexes for table `productstocklimits`
--
ALTER TABLE `productstocklimits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stocklimits_product_id_foreign` (`product_id`) USING BTREE,
  ADD KEY `fk_productstocklimits_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `professionaltax`
--
ALTER TABLE `professionaltax`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_professionaltax_business_business_id` (`business_id`);

--
-- Indexes for table `projectassignmenthistory`
--
ALTER TABLE `projectassignmenthistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_projectassignmenthistory_projects_project_id` (`project_id`),
  ADD KEY `fk_projectassignmenthistory_employees_employee_id` (`employee_id`),
  ADD KEY `fk_projectassignmenthistory_jobtitles_jobtitle_id` (`jobtitle_id`);

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

--
-- Indexes for table `projects`
--
ALTER TABLE `projects`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_projects_status_status_id` (`status_id`),
  ADD KEY `fk_projects_calendar_calendar_id` (`calendar_id`),
  ADD KEY `fk_projects_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `publicholiday`
--
ALTER TABLE `publicholiday`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_publicholiday_business_business_id` (`business_id`);

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

--
-- Indexes for table `questionnaire`
--
ALTER TABLE `questionnaire`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_questionnaire_questionnairetypes_questionnairetype_id` (`questionnairetype_id`),
  ADD KEY `fk_questionnaire_controltypes_controltype_id` (`controltype_id`);

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

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

--
-- Indexes for table `queuejobs`
--
ALTER TABLE `queuejobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `queuejobs_queue_reserved_at_index` (`queue`,`reserved_at`);

--
-- Indexes for table `quotationadditionalcharges`
--
ALTER TABLE `quotationadditionalcharges`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_quoteadditionalcharges_quotation_quotation_id` (`quotation_id`),
  ADD KEY `fk_quoteadditionalcharges_chargetypes_chargetype_id` (`chargetype_id`);

--
-- Indexes for table `quotationconfigurations`
--
ALTER TABLE `quotationconfigurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_quotationconfigurations_quotations_quotation_id` (`quotation_id`);

--
-- Indexes for table `quotationdetails`
--
ALTER TABLE `quotationdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_quotationdetails_quotation_quotation_id` (`quotation_id`),
  ADD KEY `fk_quotationdetails_products_product_id` (`product_id`);

--
-- Indexes for table `quotationdocuments`
--
ALTER TABLE `quotationdocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_quotationdocuments_quotations_quotation_id` (`quotation_id`);

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

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

--
-- Indexes for table `quotations`
--
ALTER TABLE `quotations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_quotations_customers_customer_id` (`customer_id`),
  ADD KEY `fk_quotations_businesses_business_id` (`business_id`);

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

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

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

--
-- Indexes for table `rawmaterialinventory`
--
ALTER TABLE `rawmaterialinventory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_iteminventory_unit_unittype_id` (`unittype_id`),
  ADD KEY `fk_rawmaterialinventory_rawmaterials_rawmaterial_id` (`rawmaterial_id`),
  ADD KEY `fk_rawmaterialinventory_businesses_business_id` (`business_id`);

--
-- Indexes for table `rawmaterialinventorystockin`
--
ALTER TABLE `rawmaterialinventorystockin`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_rawmaterialinventorystockin_rawmaterials_rawmaterial_id` (`rawmaterial_id`),
  ADD KEY `fk_rawmaterialinventorystockin_suppliers_supplier_id` (`supplier_id`),
  ADD KEY `fk_rawmaterialinventorystockin_warehouses_warehouse_id` (`warehouse_id`),
  ADD KEY `fk_rawmaterialinventorystockin_businesses_business_id` (`business_id`),
  ADD KEY `fk_rawmtrlinventorystockin_inventorystatus_inventorystatus_id` (`inventorystatus_id`);

--
-- Indexes for table `rawmaterialinventorystockout`
--
ALTER TABLE `rawmaterialinventorystockout`
  ADD KEY `fk_itminvstockout_itminvstockin_itminvstockin_id` (`inventorystockin_id`),
  ADD KEY `fk_rawmaterialinventorystockout_rawmaterials_rawmaterial_id` (`rawmaterial_id`),
  ADD KEY `fk_rawmaterialinventorystockout_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `rawmaterialpurchaseorderdetails`
--
ALTER TABLE `rawmaterialpurchaseorderdetails`
  ADD KEY `fk_rwmtrlprchsordrdtls_rwmtrlprchordr_rowmtlrprchsordr_id` (`rawmaterialpurchaseorder_id`),
  ADD KEY `fk_rwmtrlprchsordrdtls_rowmaterials_rowmaterial_id` (`rowmaterial_id`);

--
-- Indexes for table `rawmaterialpurchaseorders`
--
ALTER TABLE `rawmaterialpurchaseorders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_rawmaterialpurchaseorders_salesorder_salesorder_id` (`salesorder_id`) USING BTREE,
  ADD KEY `fk_rawmaterialpurchaseorders_suppliers_supplier_id` (`supplier_id`),
  ADD KEY `rawmaterialpurchaseorders_purchaseorderstatus_status_id` (`status_id`),
  ADD KEY `fk_rawmaterialpurchaseorders_businesses_business_id` (`business_id`);

--
-- Indexes for table `rawmaterials`
--
ALTER TABLE `rawmaterials`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_rawmaterials_businesses_business_id` (`business_id`),
  ADD KEY `fk_rawmaterials_categories_category_id` (`category_id`),
  ADD KEY `fk_rawmaterials_subcategories_subcategory_id` (`subcategory_id`);

--
-- Indexes for table `rawmaterialstockadjustment`
--
ALTER TABLE `rawmaterialstockadjustment`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_itmstockadjstmnt_adjstmnttype_adjstmnttype_id` (`adjustmenttype_id`);

--
-- Indexes for table `rawmaterialstocklimits`
--
ALTER TABLE `rawmaterialstocklimits`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_rawmaterialstocklimits_rawmaterials_rawmaterial_id` (`rawmaterial_id`),
  ADD KEY `fk_rawmaterialstocklimits_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `registrationcommunicationhistory`
--
ALTER TABLE `registrationcommunicationhistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_registrationcomhistory_communicationtype_communicationtype_id` (`communicationtype_id`),
  ADD KEY `fk_registrationcomhistory_bcpurchaseorders_registration_id` (`registration_id`),
  ADD KEY `fk_registrationcomhistory_businesses_business_id` (`business_id`);

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

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

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

--
-- Indexes for table `roleroutes`
--
ALTER TABLE `roleroutes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_roleroutes_modules_module_id` (`module_id`),
  ADD KEY `fk_roleroutes_areas_area_id` (`area_id`),
  ADD KEY `fk_roleroutes_roles_role_id` (`role_id`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_roles_departments_department_id` (`department_id`);

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

--
-- Indexes for table `salaries`
--
ALTER TABLE `salaries`
  ADD PRIMARY KEY (`id`),
  ADD KEY `salaries_employee_id_employees_id` (`employee_id`);

--
-- Indexes for table `salaryconfigurations`
--
ALTER TABLE `salaryconfigurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_salarycomponents_states_state_id` (`state_id`),
  ADD KEY `fk_salarycomponents_worksites_worksite_id` (`worksite_id`),
  ADD KEY `fk_salaryconfigurations_business_business_id` (`business_id`);

--
-- Indexes for table `salesorder`
--
ALTER TABLE `salesorder`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_sales_quotations_quotation_id` (`quotation_id`),
  ADD KEY `fk_sales_salesorderstatus_salesorderstatus_id` (`salesorderstatus_id`),
  ADD KEY `fk_salesorder_businesses_business_id` (`business_id`),
  ADD KEY `fk_salesorder_invoicetypes_invoicetype_id` (`invoicetype_id`);

--
-- Indexes for table `salesorderadditionalcharges`
--
ALTER TABLE `salesorderadditionalcharges`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_saleadditionalcharges_sale_saesorder_id` (`salesorder_id`),
  ADD KEY `fk_saleadditionalcharges_chargetypes_chargetype_id` (`chargetype_id`);

--
-- Indexes for table `salesorderdetails`
--
ALTER TABLE `salesorderdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_salesorderdetails_gstslabs_gstslab_id` (`gstslab_id`);

--
-- Indexes for table `salesorderdetailsbatch`
--
ALTER TABLE `salesorderdetailsbatch`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_salesroderdetailsbatch_inventorystockin_inventorystockin_id` (`inventorystockin_id`),
  ADD KEY `fk_salesorderdetailsbatch_salesdetails_salesorderdetails_id` (`referencedetail_id`),
  ADD KEY `fk_salesorderdetailbatch_products_product_id` (`product_id`),
  ADD KEY `fk_salesroderdetailsbatch_referencetypes_referencetype_id` (`orderreferencetype_id`);

--
-- Indexes for table `salesorderdocuments`
--
ALTER TABLE `salesorderdocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_billofquantitiesdocuments_billofquantities_billofquantity_id` (`salesorder_id`);

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

--
-- Indexes for table `schedulejobconfigurations`
--
ALTER TABLE `schedulejobconfigurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_configurations_schedulejobstatus_schedulejobstatus_id` (`schedulejobstatus_id`),
  ADD KEY `fk_configurations_communicationmodes_communicationmode_id` (`communicationmode_id`);

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

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

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

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

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

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

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

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

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

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

--
-- Indexes for table `servicedelivery`
--
ALTER TABLE `servicedelivery`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_servicedelivery_businesses_business_id` (`business_id`);

--
-- Indexes for table `servicedeliverydetails`
--
ALTER TABLE `servicedeliverydetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_servicedeliverydetails_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `serviceinvoice`
--
ALTER TABLE `serviceinvoice`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_serviceinvoice_categories_category_id` (`category_id`),
  ADD KEY `fk_serviceinvoice_customers_client_id` (`client_id`) USING BTREE,
  ADD KEY `fk_serviceinvoice_invoicetypes_invoicetype_id` (`invoicetype_id`),
  ADD KEY `fk_serviceinvoice_invpaymentstatus_invoicepaymentstatus_id` (`invoicepaymentstatus_id`),
  ADD KEY `fk_serviceinvoice_businesses_business_id` (`business_id`);

--
-- Indexes for table `serviceinvoicedetails`
--
ALTER TABLE `serviceinvoicedetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_serviceinvoicedetails_serviceinvoice_serviceinvoice_id` (`serviceinvoice_id`),
  ADD KEY `fk_serviceinvoicedetails_subcategories_subcategory_id` (`subcategory_id`);

--
-- Indexes for table `servicememodetails`
--
ALTER TABLE `servicememodetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_cashmemodetails_cashmemos_cashmemo_id` (`servicememo_id`),
  ADD KEY `fk_cashmemodetails_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `servicememos`
--
ALTER TABLE `servicememos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_cashmemo_customers_customer_id` (`customer_id`),
  ADD KEY `fk_cashmemos_invoicetypes_invoicetype_id` (`invoicetype_id`),
  ADD KEY `fk_cashmemos_businesses_business_id` (`business_id`),
  ADD KEY `fk_cashmemos_employees_employee_id` (`employee_id`);

--
-- Indexes for table `servicequotation`
--
ALTER TABLE `servicequotation`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_servicequotation_customers_customer_id` (`customer_id`),
  ADD KEY `fk_servicequotation_categories_category_id` (`category_id`),
  ADD KEY `fk_servicequotation_quotationstatus_quotationstatus_id` (`quotationstatus_id`),
  ADD KEY `fk_servicequotation_businesses_business_id` (`business_id`);

--
-- Indexes for table `servicequotationconfigurations`
--
ALTER TABLE `servicequotationconfigurations`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_servicequtnconfig_servicequotation_servicequotation_id` (`servicequotation_id`);

--
-- Indexes for table `servicequotationdetails`
--
ALTER TABLE `servicequotationdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_servicequotationdetails_servicequotation_servicequotation_id` (`servicequotation_id`),
  ADD KEY `fk_servicequotationdetails_subcategories_subcategory_id` (`subcategory_id`),
  ADD KEY `fk_servicequotationdetails_servicetypes_servicetype_id` (`servicetype_id`);

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

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

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

--
-- Indexes for table `shift`
--
ALTER TABLE `shift`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_shift_worksites_worksite_id` (`worksite_id`),
  ADD KEY `fk_shift_business_business_id` (`business_id`);

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

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

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

--
-- Indexes for table `states`
--
ALTER TABLE `states`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_states_countries_country_id` (`country_id`);

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

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

--
-- Indexes for table `subcategories`
--
ALTER TABLE `subcategories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_subcategories_categories_category_id` (`category_id`);

--
-- Indexes for table `supplieraddresses`
--
ALTER TABLE `supplieraddresses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_supplieraddresses_addresstypes_addresstype_id` (`addresstype_id`),
  ADD KEY `fk_supplieraddresses_suppliers_supplier_id` (`supplier_id`);

--
-- Indexes for table `suppliercommunicationhistory`
--
ALTER TABLE `suppliercommunicationhistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_suppliercommunicationhistory_suppliers_supplier_id` (`supplier_id`),
  ADD KEY `fk_supcomhistory_supcomtype_supcomype_id` (`suppliercommunicationtype_id`);

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

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

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

--
-- Indexes for table `suppliers`
--
ALTER TABLE `suppliers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_suppliers_businesses_business_id` (`business_id`);

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

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

--
-- Indexes for table `systemsettings`
--
ALTER TABLE `systemsettings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_systemsettings_modules_module_id` (`module_id`),
  ADD KEY `fk_systemsettings_areas_area_id` (`area_id`),
  ADD KEY `fk_systemsettings_sections_section_id` (`section_id`);

--
-- Indexes for table `taskassignmenthistory`
--
ALTER TABLE `taskassignmenthistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_taskassignmenthistory_task_id_tasks_id` (`task_id`);

--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_tasks_project_id_projects_id` (`project_id`),
  ADD KEY `fk_tasks_calendar_calendar_id` (`calendar_id`),
  ADD KEY `fk_tasks_businesses_business_id` (`business_id`);

--
-- Indexes for table `templates`
--
ALTER TABLE `templates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_templates_communicationmodes_coomunicationmode_id` (`communicationmode_id`),
  ADD KEY `fk_templates_templatetypes_templatetype_id` (`templatetype_id`);

--
-- Indexes for table `templatetypes`
--
ALTER TABLE `templatetypes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_templatetypes_modules_module_id` (`module_id`);

--
-- Indexes for table `tenderassignmenthistory`
--
ALTER TABLE `tenderassignmenthistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_tenderassignmenthistory_tenders_tender_id` (`tender_id`),
  ADD KEY `fk_tenderassignmenthistory_employees_employee_id` (`employee_id`),
  ADD KEY `fk_tenderassignmenthistory_jobtitles_jobtitle_id` (`jobtitle_id`);

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

--
-- Indexes for table `tenderdetails`
--
ALTER TABLE `tenderdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_tenderdetails_products_product_id` (`product_id`) USING BTREE,
  ADD KEY `fk_tenderdetails_tenders_tender_id` (`tender_id`);

--
-- Indexes for table `tenderdocuments`
--
ALTER TABLE `tenderdocuments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fK_tenderdocuments_tenders_tender_id` (`tender_id`);

--
-- Indexes for table `tenders`
--
ALTER TABLE `tenders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_tenders_businesses_business_id` (`business_id`),
  ADD KEY `fk_tenders_customeraddresses_address_id` (`address_id`);

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

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

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

--
-- Indexes for table `timesheet`
--
ALTER TABLE `timesheet`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_timesheet_shift_shift_id` (`shift_id`),
  ADD KEY `fk_timesheet_worksites_worksite_id` (`worksite_id`),
  ADD KEY `fk_timesheet_timesheetstatus_status_id` (`status_id`),
  ADD KEY `fk_timesheet_business_business_id` (`business_id`);

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

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

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `account_id` (`account_id`),
  ADD KEY `business_id` (`business_id`);

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

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

--
-- Indexes for table `travelallowances`
--
ALTER TABLE `travelallowances`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fK_travelallowances_skilledcategory_skillcategory_id` (`skillcategory_id`),
  ADD KEY `fk_travelallowances_worksites_worksite_id` (`worksite_id`);

--
-- Indexes for table `travelexpenses`
--
ALTER TABLE `travelexpenses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_travelexpenses_expensetypes_expensetypes_id` (`expensetypes_id`),
  ADD KEY `fk_travelexpenses_employees_employee_id` (`employee_id`),
  ADD KEY `fk_travelexpenses_business_business_id` (`business_id`);

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

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

--
-- Indexes for table `userroles`
--
ALTER TABLE `userroles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_userroles_users_user_id` (`user_id`),
  ADD KEY `fk_userroles_roles_role_id` (`role_id`);

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

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

--
-- Indexes for table `vendoraddresses`
--
ALTER TABLE `vendoraddresses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_vendoraddresses_addresstypes_addresstype_id` (`addresstype_id`),
  ADD KEY `fk_vendoraddresses_vendors_vendor_id` (`vendor_id`);

--
-- Indexes for table `vendorbankdetails`
--
ALTER TABLE `vendorbankdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_employeebankdetails_employees_employee_id` (`vendor_id`);

--
-- Indexes for table `vendorcommunicationhistory`
--
ALTER TABLE `vendorcommunicationhistory`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_vendorcommunicationhistory_vendorcommutype_vendorcommunicatio` (`vendorcommunicationtype_id`);

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

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

--
-- Indexes for table `vendors`
--
ALTER TABLE `vendors`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_vendors_businesses_business_id` (`business_id`);

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

--
-- Indexes for table `visitplanningdetails`
--
ALTER TABLE `visitplanningdetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_visitplanningdetails_visitplannings_visitplanning_id` (`visitplanning_id`);

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

--
-- Indexes for table `warehouses`
--
ALTER TABLE `warehouses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_warehouses_businesses_business_id` (`business_id`);

--
-- Indexes for table `warranty`
--
ALTER TABLE `warranty`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_warranty_businesses_business_id` (`business_id`),
  ADD KEY `fk_warranty_servicecycle_servicecycle_id` (`servicecycle_id`);

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

--
-- Indexes for table `warrantyservicedetails`
--
ALTER TABLE `warrantyservicedetails`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_warrantyservicedetails_warranty_warranty_id` (`warranty_id`) USING BTREE,
  ADD KEY `fk_warrantyservicedetails_servicestatus_servicestatus_id` (`servicestatus_id`) USING BTREE,
  ADD KEY `fk_warrantyservicedetails_calendar_calendar_id` (`calendar_id`) USING BTREE;

--
-- Indexes for table `weekendoff`
--
ALTER TABLE `weekendoff`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_weekendoff_days_day_id` (`day_id`),
  ADD KEY `fk_weekendoff_business_business_id` (`business_id`);

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

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

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

--
-- Indexes for table `worksites`
--
ALTER TABLE `worksites`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_worksites_business_business_id` (`business_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `accountgroups`
--
ALTER TABLE `accountgroups`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `accounts`
--
ALTER TABLE `accounts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `actualvisitcommunicationhistory`
--
ALTER TABLE `actualvisitcommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `actualvisitcommunicationtype`
--
ALTER TABLE `actualvisitcommunicationtype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `actualvisits`
--
ALTER TABLE `actualvisits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `addresstypes`
--
ALTER TABLE `addresstypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `adjustmenttype`
--
ALTER TABLE `adjustmenttype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `advertisingcosting`
--
ALTER TABLE `advertisingcosting`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `allocationdetails`
--
ALTER TABLE `allocationdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `allocations`
--
ALTER TABLE `allocations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `amc`
--
ALTER TABLE `amc`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `amcdetails`
--
ALTER TABLE `amcdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `amcservicedetails`
--
ALTER TABLE `amcservicedetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `amcstatus`
--
ALTER TABLE `amcstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `amctypes`
--
ALTER TABLE `amctypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `answers`
--
ALTER TABLE `answers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `applicationtypes`
--
ALTER TABLE `applicationtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `areacommunicationtypes`
--
ALTER TABLE `areacommunicationtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `areadocumenttypes`
--
ALTER TABLE `areadocumenttypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=125;

--
-- AUTO_INCREMENT for table `areaexporttypes`
--
ALTER TABLE `areaexporttypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=161;

--
-- AUTO_INCREMENT for table `areas`
--
ALTER TABLE `areas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=299;

--
-- AUTO_INCREMENT for table `areasubroutes`
--
ALTER TABLE `areasubroutes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=68;

--
-- AUTO_INCREMENT for table `areatypes`
--
ALTER TABLE `areatypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `arrears`
--
ALTER TABLE `arrears`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `arrearstatus`
--
ALTER TABLE `arrearstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `assettypes`
--
ALTER TABLE `assettypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `assignmenthistory`
--
ALTER TABLE `assignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `attended`
--
ALTER TABLE `attended`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `authorizedarearolepermissions`
--
ALTER TABLE `authorizedarearolepermissions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=226;

--
-- AUTO_INCREMENT for table `authorizedbusinessrolepermissions`
--
ALTER TABLE `authorizedbusinessrolepermissions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bcpurchaseordercommunicationhistory`
--
ALTER TABLE `bcpurchaseordercommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bcpurchaseorders`
--
ALTER TABLE `bcpurchaseorders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT for table `billofquantities`
--
ALTER TABLE `billofquantities`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `billofquantitiesdocuments`
--
ALTER TABLE `billofquantitiesdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `billofquantitiesrawmaterials`
--
ALTER TABLE `billofquantitiesrawmaterials`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `billofquantityconfigurations`
--
ALTER TABLE `billofquantityconfigurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `billofquantitydetails`
--
ALTER TABLE `billofquantitydetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `billtypes`
--
ALTER TABLE `billtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `bloodgroups`
--
ALTER TABLE `bloodgroups`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `boilersuitsizes`
--
ALTER TABLE `boilersuitsizes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `bonus`
--
ALTER TABLE `bonus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `bonustypes`
--
ALTER TABLE `bonustypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `bookingtypes`
--
ALTER TABLE `bookingtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `branchlocation`
--
ALTER TABLE `branchlocation`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `brands`
--
ALTER TABLE `brands`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `businessaddresses`
--
ALTER TABLE `businessaddresses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `businessconsultingprojects`
--
ALTER TABLE `businessconsultingprojects`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `businessdocuments`
--
ALTER TABLE `businessdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `businesses`
--
ALTER TABLE `businesses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `businessplan`
--
ALTER TABLE `businessplan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `businessplandetails`
--
ALTER TABLE `businessplandetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `businessplantargets`
--
ALTER TABLE `businessplantargets`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `calendar`
--
ALTER TABLE `calendar`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cancelledserialnumbers`
--
ALTER TABLE `cancelledserialnumbers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidatecommunicationhistory`
--
ALTER TABLE `candidatecommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidatecommunicationtype`
--
ALTER TABLE `candidatecommunicationtype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `candidatejobopenings`
--
ALTER TABLE `candidatejobopenings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidatejobtitles`
--
ALTER TABLE `candidatejobtitles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidatemcqanswers`
--
ALTER TABLE `candidatemcqanswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidatepastexperience`
--
ALTER TABLE `candidatepastexperience`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidatepersonalinterviewanswers`
--
ALTER TABLE `candidatepersonalinterviewanswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidates`
--
ALTER TABLE `candidates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `candidateskills`
--
ALTER TABLE `candidateskills`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cashflowtypes`
--
ALTER TABLE `cashflowtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `cashmemodetails`
--
ALTER TABLE `cashmemodetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cashmemopaymentstatus`
--
ALTER TABLE `cashmemopaymentstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `cashmemos`
--
ALTER TABLE `cashmemos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `challandeliverymodes`
--
ALTER TABLE `challandeliverymodes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `chargetypes`
--
ALTER TABLE `chargetypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `cities`
--
ALTER TABLE `cities`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `claimstatus`
--
ALTER TABLE `claimstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `commissionconfigurations`
--
ALTER TABLE `commissionconfigurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `commissions`
--
ALTER TABLE `commissions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `communicationhistory`
--
ALTER TABLE `communicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `communicationhistoryaudit`
--
ALTER TABLE `communicationhistoryaudit`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `communicationmodes`
--
ALTER TABLE `communicationmodes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `communicationtype`
--
ALTER TABLE `communicationtype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT for table `communicationtypegroups`
--
ALTER TABLE `communicationtypegroups`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `companygoals`
--
ALTER TABLE `companygoals`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `companygoalsdetails`
--
ALTER TABLE `companygoalsdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `complaintassignmenthistory`
--
ALTER TABLE `complaintassignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `complaintdocuments`
--
ALTER TABLE `complaintdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `complaintfeedbackanswers`
--
ALTER TABLE `complaintfeedbackanswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `complaintpaymentstatus`
--
ALTER TABLE `complaintpaymentstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `complaintproductdetails`
--
ALTER TABLE `complaintproductdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `complaintresolutionassignmenthistory`
--
ALTER TABLE `complaintresolutionassignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `complaints`
--
ALTER TABLE `complaints`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `complaintstatus`
--
ALTER TABLE `complaintstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `complainttypes`
--
ALTER TABLE `complainttypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `complaintvisits`
--
ALTER TABLE `complaintvisits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `compliances`
--
ALTER TABLE `compliances`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `consignmentchallan`
--
ALTER TABLE `consignmentchallan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `consignmentchallanadditionalcharges`
--
ALTER TABLE `consignmentchallanadditionalcharges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `consignmentchallandetails`
--
ALTER TABLE `consignmentchallandetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `contract`
--
ALTER TABLE `contract`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `contractstatus`
--
ALTER TABLE `contractstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `controltypes`
--
ALTER TABLE `controltypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `costcarddetails`
--
ALTER TABLE `costcarddetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `costcards`
--
ALTER TABLE `costcards`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `countries`
--
ALTER TABLE `countries`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `courieres`
--
ALTER TABLE `courieres`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `creditnotedetails`
--
ALTER TABLE `creditnotedetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `creditnotes`
--
ALTER TABLE `creditnotes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `creditnotestatus`
--
ALTER TABLE `creditnotestatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `currencies`
--
ALTER TABLE `currencies`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `customeraddresses`
--
ALTER TABLE `customeraddresses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customercategories`
--
ALTER TABLE `customercategories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `customercommunicationlogs`
--
ALTER TABLE `customercommunicationlogs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customercommunicationtypes`
--
ALTER TABLE `customercommunicationtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `customerdocuments`
--
ALTER TABLE `customerdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customerfeedbackanswers`
--
ALTER TABLE `customerfeedbackanswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customerproductcategories`
--
ALTER TABLE `customerproductcategories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customerquestionnaire`
--
ALTER TABLE `customerquestionnaire`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customers`
--
ALTER TABLE `customers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customersocialmedia`
--
ALTER TABLE `customersocialmedia`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `customerstatus`
--
ALTER TABLE `customerstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `customertypes`
--
ALTER TABLE `customertypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `days`
--
ALTER TABLE `days`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `daytypes`
--
ALTER TABLE `daytypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `deadleadreasontypes`
--
ALTER TABLE `deadleadreasontypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `debitnotedetails`
--
ALTER TABLE `debitnotedetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `debitnotes`
--
ALTER TABLE `debitnotes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `degree`
--
ALTER TABLE `degree`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deliverychallan`
--
ALTER TABLE `deliverychallan`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deliverychallanadditionalcharges`
--
ALTER TABLE `deliverychallanadditionalcharges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `deliverychallandetails`
--
ALTER TABLE `deliverychallandetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `departments`
--
ALTER TABLE `departments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `designations`
--
ALTER TABLE `designations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `directors`
--
ALTER TABLE `directors`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `docket`
--
ALTER TABLE `docket`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `documenttypes`
--
ALTER TABLE `documenttypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=57;

--
-- AUTO_INCREMENT for table `employeebankdetails`
--
ALTER TABLE `employeebankdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `employeebookings`
--
ALTER TABLE `employeebookings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employeedocuments`
--
ALTER TABLE `employeedocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employeefamilydetails`
--
ALTER TABLE `employeefamilydetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employeeleaves`
--
ALTER TABLE `employeeleaves`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employeeleavestatus`
--
ALTER TABLE `employeeleavestatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `employeeofficialdetails`
--
ALTER TABLE `employeeofficialdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `employeeorientationanswers`
--
ALTER TABLE `employeeorientationanswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employeeorientations`
--
ALTER TABLE `employeeorientations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employeepayrolldetails`
--
ALTER TABLE `employeepayrolldetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employees`
--
ALTER TABLE `employees`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `employeetrainings`
--
ALTER TABLE `employeetrainings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `employeetypes`
--
ALTER TABLE `employeetypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `employer`
--
ALTER TABLE `employer`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `employerconfigurations`
--
ALTER TABLE `employerconfigurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `enquiries`
--
ALTER TABLE `enquiries`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `enquiryassignmenthistory`
--
ALTER TABLE `enquiryassignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `enquirycommunicationhistory`
--
ALTER TABLE `enquirycommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `enquirydetails`
--
ALTER TABLE `enquirydetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `enquirydocuments`
--
ALTER TABLE `enquirydocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `enquirysources`
--
ALTER TABLE `enquirysources`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `enquirystatus`
--
ALTER TABLE `enquirystatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `enquirytypes`
--
ALTER TABLE `enquirytypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `eventtypes`
--
ALTER TABLE `eventtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ewaybill`
--
ALTER TABLE `ewaybill`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `expenses`
--
ALTER TABLE `expenses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `expensestypes`
--
ALTER TABLE `expensestypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `exporttypes`
--
ALTER TABLE `exporttypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `feedbackanswers`
--
ALTER TABLE `feedbackanswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `feedbackquestions`
--
ALTER TABLE `feedbackquestions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `feedbackweightages`
--
ALTER TABLE `feedbackweightages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `financialyears`
--
ALTER TABLE `financialyears`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `foodallowances`
--
ALTER TABLE `foodallowances`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `generalsettings`
--
ALTER TABLE `generalsettings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `goals`
--
ALTER TABLE `goals`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `goalscores`
--
ALTER TABLE `goalscores`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `gstslabs`
--
ALTER TABLE `gstslabs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `importlogs`
--
ALTER TABLE `importlogs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `importsamples`
--
ALTER TABLE `importsamples`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `incentives`
--
ALTER TABLE `incentives`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `incentivestatus`
--
ALTER TABLE `incentivestatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `incidents`
--
ALTER TABLE `incidents`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `industries`
--
ALTER TABLE `industries`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `installationproviders`
--
ALTER TABLE `installationproviders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `interviewtypes`
--
ALTER TABLE `interviewtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `inventorystatus`
--
ALTER TABLE `inventorystatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `invoiceadditionalcharges`
--
ALTER TABLE `invoiceadditionalcharges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `invoiceconfigurations`
--
ALTER TABLE `invoiceconfigurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `invoicedetails`
--
ALTER TABLE `invoicedetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `invoicedocuments`
--
ALTER TABLE `invoicedocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `invoicepaymentstatus`
--
ALTER TABLE `invoicepaymentstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `invoicereferencetypes`
--
ALTER TABLE `invoicereferencetypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `invoices`
--
ALTER TABLE `invoices`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `invoicestatus`
--
ALTER TABLE `invoicestatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `invoicetypes`
--
ALTER TABLE `invoicetypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `issueassignmenthistory`
--
ALTER TABLE `issueassignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `issues`
--
ALTER TABLE `issues`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `issuestatus`
--
ALTER TABLE `issuestatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `jobkpis`
--
ALTER TABLE `jobkpis`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobkras`
--
ALTER TABLE `jobkras`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobopeningassignmenthistory`
--
ALTER TABLE `jobopeningassignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobopeningcommunicationhistory`
--
ALTER TABLE `jobopeningcommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobopeningcommunicationtype`
--
ALTER TABLE `jobopeningcommunicationtype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `jobopenings`
--
ALTER TABLE `jobopenings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobopeningskills`
--
ALTER TABLE `jobopeningskills`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobplanningdetails`
--
ALTER TABLE `jobplanningdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobplannings`
--
ALTER TABLE `jobplannings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobplanningstatus`
--
ALTER TABLE `jobplanningstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `jobplanningworkflow`
--
ALTER TABLE `jobplanningworkflow`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `jobplanningworkflowdetails`
--
ALTER TABLE `jobplanningworkflowdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobplanningworkflowstatus`
--
ALTER TABLE `jobplanningworkflowstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `jobstatus`
--
ALTER TABLE `jobstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `jobtitles`
--
ALTER TABLE `jobtitles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobworkassignmenthistory`
--
ALTER TABLE `jobworkassignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobworkdocuments`
--
ALTER TABLE `jobworkdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobworkpaymentstatus`
--
ALTER TABLE `jobworkpaymentstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `jobworkresolutionhistory`
--
ALTER TABLE `jobworkresolutionhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobworks`
--
ALTER TABLE `jobworks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobworkstatus`
--
ALTER TABLE `jobworkstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `jobworktypes`
--
ALTER TABLE `jobworktypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `jobworkvisits`
--
ALTER TABLE `jobworkvisits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `kpi`
--
ALTER TABLE `kpi`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `kra`
--
ALTER TABLE `kra`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `leadqualificationanswers`
--
ALTER TABLE `leadqualificationanswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `leadsources`
--
ALTER TABLE `leadsources`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `leaveapplication`
--
ALTER TABLE `leaveapplication`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `leaveapplicationdetails`
--
ALTER TABLE `leaveapplicationdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `leavetypes`
--
ALTER TABLE `leavetypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `loanrepayments`
--
ALTER TABLE `loanrepayments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `loans`
--
ALTER TABLE `loans`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `loanschedules`
--
ALTER TABLE `loanschedules`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `loanschedulestatus`
--
ALTER TABLE `loanschedulestatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `loanstatus`
--
ALTER TABLE `loanstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `logisticsdetails`
--
ALTER TABLE `logisticsdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `logisticspaymentstatus`
--
ALTER TABLE `logisticspaymentstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `logstatus`
--
ALTER TABLE `logstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `lwfsettings`
--
ALTER TABLE `lwfsettings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `marketingcommunicationhistory`
--
ALTER TABLE `marketingcommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `materials`
--
ALTER TABLE `materials`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mcqanswers`
--
ALTER TABLE `mcqanswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mcqquestionnaire`
--
ALTER TABLE `mcqquestionnaire`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mcqweightages`
--
ALTER TABLE `mcqweightages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `measurementtypes`
--
ALTER TABLE `measurementtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `moduleareas`
--
ALTER TABLE `moduleareas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=315;

--
-- AUTO_INCREMENT for table `modules`
--
ALTER TABLE `modules`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=24;

--
-- AUTO_INCREMENT for table `months`
--
ALTER TABLE `months`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `notifications`
--
ALTER TABLE `notifications`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `octanicsaccounts`
--
ALTER TABLE `octanicsaccounts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `orderreferencetypes`
--
ALTER TABLE `orderreferencetypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `orderworkflow`
--
ALTER TABLE `orderworkflow`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `orderworkflowdetails`
--
ALTER TABLE `orderworkflowdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `orderworkflowstatus`
--
ALTER TABLE `orderworkflowstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `orientation`
--
ALTER TABLE `orientation`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `orientationanswers`
--
ALTER TABLE `orientationanswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `orientationquestionnaire`
--
ALTER TABLE `orientationquestionnaire`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `orientationstatus`
--
ALTER TABLE `orientationstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `overheadcost`
--
ALTER TABLE `overheadcost`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `parameters`
--
ALTER TABLE `parameters`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=117;

--
-- AUTO_INCREMENT for table `partneraddresses`
--
ALTER TABLE `partneraddresses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `partneranswers`
--
ALTER TABLE `partneranswers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `partnerbankdetails`
--
ALTER TABLE `partnerbankdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `partnercommunicationhistory`
--
ALTER TABLE `partnercommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `partnercommunicationtype`
--
ALTER TABLE `partnercommunicationtype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `partnerdocuments`
--
ALTER TABLE `partnerdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `partnerquestionnaire`
--
ALTER TABLE `partnerquestionnaire`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `partnerreferrals`
--
ALTER TABLE `partnerreferrals`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `partners`
--
ALTER TABLE `partners`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `partnerstatus`
--
ALTER TABLE `partnerstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `partnertypes`
--
ALTER TABLE `partnertypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `paymentcycle`
--
ALTER TABLE `paymentcycle`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `paymentcycletypes`
--
ALTER TABLE `paymentcycletypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `paymentmodes`
--
ALTER TABLE `paymentmodes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `payments`
--
ALTER TABLE `payments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `paymentslip`
--
ALTER TABLE `paymentslip`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `paymentslipconfigurations`
--
ALTER TABLE `paymentslipconfigurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `paymentslipdetails`
--
ALTER TABLE `paymentslipdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `paymentslipstatus`
--
ALTER TABLE `paymentslipstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `paymentstatus`
--
ALTER TABLE `paymentstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `payouttypes`
--
ALTER TABLE `payouttypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `payrolllogs`
--
ALTER TABLE `payrolllogs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `payrollstatus`
--
ALTER TABLE `payrollstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `payslip`
--
ALTER TABLE `payslip`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `payslipstatus`
--
ALTER TABLE `payslipstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `performancekpi`
--
ALTER TABLE `performancekpi`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `performancekpidetails`
--
ALTER TABLE `performancekpidetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `personalinterviewquestions`
--
ALTER TABLE `personalinterviewquestions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `platformparameters`
--
ALTER TABLE `platformparameters`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `pricecategory`
--
ALTER TABLE `pricecategory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `priority`
--
ALTER TABLE `priority`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `processingcenterlogs`
--
ALTER TABLE `processingcenterlogs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `procurementdetails`
--
ALTER TABLE `procurementdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `procurements`
--
ALTER TABLE `procurements`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `procurementstatus`
--
ALTER TABLE `procurementstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `productinventory`
--
ALTER TABLE `productinventory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `productinventorystockin`
--
ALTER TABLE `productinventorystockin`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `productinventorystockout`
--
ALTER TABLE `productinventorystockout`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `productionplanning`
--
ALTER TABLE `productionplanning`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `productionplanningdetails`
--
ALTER TABLE `productionplanningdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `productpurchaseorderadditionalcharges`
--
ALTER TABLE `productpurchaseorderadditionalcharges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `productpurchaseorderdetails`
--
ALTER TABLE `productpurchaseorderdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `productpurchaseorders`
--
ALTER TABLE `productpurchaseorders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `productstockadjustment`
--
ALTER TABLE `productstockadjustment`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `productstocklimits`
--
ALTER TABLE `productstocklimits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `producttypes`
--
ALTER TABLE `producttypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `professionaltax`
--
ALTER TABLE `professionaltax`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `projectassignmenthistory`
--
ALTER TABLE `projectassignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `projectdocuments`
--
ALTER TABLE `projectdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `projects`
--
ALTER TABLE `projects`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `projectstatus`
--
ALTER TABLE `projectstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `projecttypes`
--
ALTER TABLE `projecttypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `publicholiday`
--
ALTER TABLE `publicholiday`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `purchaseorderstatus`
--
ALTER TABLE `purchaseorderstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `questionnaire`
--
ALTER TABLE `questionnaire`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `questionnairetypes`
--
ALTER TABLE `questionnairetypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `questionnaireweightages`
--
ALTER TABLE `questionnaireweightages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `queuejobs`
--
ALTER TABLE `queuejobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quotationadditionalcharges`
--
ALTER TABLE `quotationadditionalcharges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quotationconfigurations`
--
ALTER TABLE `quotationconfigurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quotationdetails`
--
ALTER TABLE `quotationdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quotationdocuments`
--
ALTER TABLE `quotationdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quotationpriority`
--
ALTER TABLE `quotationpriority`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `quotationproductserialnos`
--
ALTER TABLE `quotationproductserialnos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `quotations`
--
ALTER TABLE `quotations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `quotationstatus`
--
ALTER TABLE `quotationstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `ratecard`
--
ALTER TABLE `ratecard`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ratecarddetails`
--
ALTER TABLE `ratecarddetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rawmaterialinventory`
--
ALTER TABLE `rawmaterialinventory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rawmaterialinventorystockin`
--
ALTER TABLE `rawmaterialinventorystockin`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rawmaterialpurchaseorderadditionalcharges`
--
ALTER TABLE `rawmaterialpurchaseorderadditionalcharges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rawmaterialpurchaseorders`
--
ALTER TABLE `rawmaterialpurchaseorders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rawmaterials`
--
ALTER TABLE `rawmaterials`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rawmaterialstockadjustment`
--
ALTER TABLE `rawmaterialstockadjustment`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `rawmaterialstocklimits`
--
ALTER TABLE `rawmaterialstocklimits`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `recruitmentcurrentstatus`
--
ALTER TABLE `recruitmentcurrentstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `recruitmentstatus`
--
ALTER TABLE `recruitmentstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `registrationcommunicationhistory`
--
ALTER TABLE `registrationcommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `registrations`
--
ALTER TABLE `registrations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `registrationstatus`
--
ALTER TABLE `registrationstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `relationships`
--
ALTER TABLE `relationships`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `roleroutes`
--
ALTER TABLE `roleroutes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=186;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `safetyshoessizes`
--
ALTER TABLE `safetyshoessizes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `salaries`
--
ALTER TABLE `salaries`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `salaryconfigurations`
--
ALTER TABLE `salaryconfigurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `salesorder`
--
ALTER TABLE `salesorder`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `salesorderadditionalcharges`
--
ALTER TABLE `salesorderadditionalcharges`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `salesorderdetails`
--
ALTER TABLE `salesorderdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `salesorderdetailsbatch`
--
ALTER TABLE `salesorderdetailsbatch`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `salesorderdocuments`
--
ALTER TABLE `salesorderdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `salesorderstatus`
--
ALTER TABLE `salesorderstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `schedulejobconfigurations`
--
ALTER TABLE `schedulejobconfigurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `schedulejobstatus`
--
ALTER TABLE `schedulejobstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `schedulejobtypes`
--
ALTER TABLE `schedulejobtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `scmorderdetails`
--
ALTER TABLE `scmorderdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `scmorders`
--
ALTER TABLE `scmorders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `scmordersources`
--
ALTER TABLE `scmordersources`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `scmorderstatus`
--
ALTER TABLE `scmorderstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `scmprocess`
--
ALTER TABLE `scmprocess`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `scmstatus`
--
ALTER TABLE `scmstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `sections`
--
ALTER TABLE `sections`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `servicecycle`
--
ALTER TABLE `servicecycle`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `servicedelivery`
--
ALTER TABLE `servicedelivery`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `servicedeliverydetails`
--
ALTER TABLE `servicedeliverydetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `servicedeliverystatus`
--
ALTER TABLE `servicedeliverystatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `serviceinvoice`
--
ALTER TABLE `serviceinvoice`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `serviceinvoicedetails`
--
ALTER TABLE `serviceinvoicedetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `servicememodetails`
--
ALTER TABLE `servicememodetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `servicememopaymentstatus`
--
ALTER TABLE `servicememopaymentstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `servicememos`
--
ALTER TABLE `servicememos`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `servicequotation`
--
ALTER TABLE `servicequotation`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `servicequotationconfigurations`
--
ALTER TABLE `servicequotationconfigurations`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `servicequotationdetails`
--
ALTER TABLE `servicequotationdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `servicestatus`
--
ALTER TABLE `servicestatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `servicetypes`
--
ALTER TABLE `servicetypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `settings`
--
ALTER TABLE `settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `shift`
--
ALTER TABLE `shift`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sizes`
--
ALTER TABLE `sizes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `skilledcategory`
--
ALTER TABLE `skilledcategory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `skills`
--
ALTER TABLE `skills`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `states`
--
ALTER TABLE `states`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=39;

--
-- AUTO_INCREMENT for table `status`
--
ALTER TABLE `status`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `stocktypes`
--
ALTER TABLE `stocktypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `subcategories`
--
ALTER TABLE `subcategories`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `supplieraddresses`
--
ALTER TABLE `supplieraddresses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `suppliercommunicationhistory`
--
ALTER TABLE `suppliercommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `suppliercommunicationtype`
--
ALTER TABLE `suppliercommunicationtype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `supplierproducts`
--
ALTER TABLE `supplierproducts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `supplierrawmaterials`
--
ALTER TABLE `supplierrawmaterials`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `suppliers`
--
ALTER TABLE `suppliers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `support`
--
ALTER TABLE `support`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `systemapi`
--
ALTER TABLE `systemapi`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `systemsettings`
--
ALTER TABLE `systemsettings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=407;

--
-- AUTO_INCREMENT for table `taskassignmenthistory`
--
ALTER TABLE `taskassignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tasks`
--
ALTER TABLE `tasks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `templates`
--
ALTER TABLE `templates`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=89;

--
-- AUTO_INCREMENT for table `templatetypes`
--
ALTER TABLE `templatetypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=59;

--
-- AUTO_INCREMENT for table `tenderassignmenthistory`
--
ALTER TABLE `tenderassignmenthistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tendercommunicationhistory`
--
ALTER TABLE `tendercommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tenderdetails`
--
ALTER TABLE `tenderdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tenderdocuments`
--
ALTER TABLE `tenderdocuments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tenders`
--
ALTER TABLE `tenders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tenderstatus`
--
ALTER TABLE `tenderstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `tenderstechnicalstatus`
--
ALTER TABLE `tenderstechnicalstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `tendertypes`
--
ALTER TABLE `tendertypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `timesheet`
--
ALTER TABLE `timesheet`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `timesheetstatus`
--
ALTER TABLE `timesheetstatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `trainings`
--
ALTER TABLE `trainings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `transactionsubtypes`
--
ALTER TABLE `transactionsubtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `transportationtypes`
--
ALTER TABLE `transportationtypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `travelallowances`
--
ALTER TABLE `travelallowances`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `travelexpenses`
--
ALTER TABLE `travelexpenses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `travelexpensestatus`
--
ALTER TABLE `travelexpensestatus`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `unit`
--
ALTER TABLE `unit`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `userroles`
--
ALTER TABLE `userroles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `usertype`
--
ALTER TABLE `usertype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `vehicletypes`
--
ALTER TABLE `vehicletypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `vendoraddresses`
--
ALTER TABLE `vendoraddresses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vendorbankdetails`
--
ALTER TABLE `vendorbankdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vendorcommunicationhistory`
--
ALTER TABLE `vendorcommunicationhistory`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vendorcommunicationtype`
--
ALTER TABLE `vendorcommunicationtype`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `vendorfunctions`
--
ALTER TABLE `vendorfunctions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `vendors`
--
ALTER TABLE `vendors`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vendortypes`
--
ALTER TABLE `vendortypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `visitplanningdetails`
--
ALTER TABLE `visitplanningdetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `visitplannings`
--
ALTER TABLE `visitplannings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `warehouses`
--
ALTER TABLE `warehouses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `warranty`
--
ALTER TABLE `warranty`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `warrantydetails`
--
ALTER TABLE `warrantydetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `warrantyservicedetails`
--
ALTER TABLE `warrantyservicedetails`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `weekendoff`
--
ALTER TABLE `weekendoff`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `workingdays`
--
ALTER TABLE `workingdays`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `workingdaytypes`
--
ALTER TABLE `workingdaytypes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `workitems`
--
ALTER TABLE `workitems`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `worksites`
--
ALTER TABLE `worksites`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `year`
--
ALTER TABLE `year`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `accountgroups`
--
ALTER TABLE `accountgroups`
  ADD CONSTRAINT `accountgroups_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `accounts`
--
ALTER TABLE `accounts`
  ADD CONSTRAINT `accounts_accountgroups_accountgroup_id` FOREIGN KEY (`accountgroup_id`) REFERENCES `accountgroups` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `accounts_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `actualvisits`
--
ALTER TABLE `actualvisits`
  ADD CONSTRAINT `fk_actualvisits_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `advertisingcosting`
--
ALTER TABLE `advertisingcosting`
  ADD CONSTRAINT `fk_advertisingcosting_leadsources_leadsource_id` FOREIGN KEY (`leadsource_id`) REFERENCES `leadsources` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `allocationdetails`
--
ALTER TABLE `allocationdetails`
  ADD CONSTRAINT `fk_allocationdetails_allocations_allocation_id` FOREIGN KEY (`allocation_id`) REFERENCES `allocations` (`id`),
  ADD CONSTRAINT `fk_allocationdetails_brands_brand_id` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`),
  ADD CONSTRAINT `fk_allocationdetails_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_allocationdetails_categories_category_id` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`),
  ADD CONSTRAINT `fk_allocationdetails_rawmaterial_rawmaterial_id` FOREIGN KEY (`rawmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_allocationdetails_sizes_size_id` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`),
  ADD CONSTRAINT `fk_allocationdetails_subcategories_subcategory_id` FOREIGN KEY (`subcategory_id`) REFERENCES `subcategories` (`id`);

--
-- Constraints for table `allocations`
--
ALTER TABLE `allocations`
  ADD CONSTRAINT `fk_allocations_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_allocations_costcards_costcard_id` FOREIGN KEY (`costcard_id`) REFERENCES `costcards` (`id`),
  ADD CONSTRAINT `fk_allocations_projects_project_id` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`);

--
-- Constraints for table `amc`
--
ALTER TABLE `amc`
  ADD CONSTRAINT `fk_amc_amcstatus_amcstatus_id` FOREIGN KEY (`amcstatus_id`) REFERENCES `amcstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_amc_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_amc_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `amcdetails`
--
ALTER TABLE `amcdetails`
  ADD CONSTRAINT `fk_amcdetails_amc_amc_id` FOREIGN KEY (`amc_id`) REFERENCES `amc` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_amcdetails_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `amcservicedetails`
--
ALTER TABLE `amcservicedetails`
  ADD CONSTRAINT `fk_amcservicedetails_amc_amc_id` FOREIGN KEY (`amc_id`) REFERENCES `amc` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_amcservicedetails_servicestatus_servicestatus_id` FOREIGN KEY (`servicestatus_id`) REFERENCES `servicestatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_calendar_calendar_id` FOREIGN KEY (`calendar_id`) REFERENCES `calendar` (`id`);

--
-- Constraints for table `answers`
--
ALTER TABLE `answers`
  ADD CONSTRAINT `fk_answers_questionnaire_questionnaire_id` FOREIGN KEY (`questionnaire_id`) REFERENCES `questionnaire` (`id`);

--
-- Constraints for table `areacommunicationtypes`
--
ALTER TABLE `areacommunicationtypes`
  ADD CONSTRAINT `fk_areacommunicationtypes_areas_area_id` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_areacommunicationtypes_communicationtype_communicationtype_id` FOREIGN KEY (`communicationtype_id`) REFERENCES `communicationtype` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_areacommunicationtypes_modules_module_id` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `areadocumenttypes`
--
ALTER TABLE `areadocumenttypes`
  ADD CONSTRAINT `fk_areadocumenttypes_areas_area_id` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_areadocumenttypes_documenttype_id` FOREIGN KEY (`documenttype_id`) REFERENCES `documenttypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_areadocumenttypes_modules_module_id` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `areaexporttypes`
--
ALTER TABLE `areaexporttypes`
  ADD CONSTRAINT `fk_areaexporttype_areas_area_id` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_areaexporttypes_exporttypes_exportype_id` FOREIGN KEY (`exporttype_id`) REFERENCES `exporttypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_areaexporttypes_modules_module_id` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `areas`
--
ALTER TABLE `areas`
  ADD CONSTRAINT `fk_areas_applicationtypes_applicationtype_id` FOREIGN KEY (`applicationtype_id`) REFERENCES `applicationtypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `areasubroutes`
--
ALTER TABLE `areasubroutes`
  ADD CONSTRAINT `fk_areasubroutes_areas_area_id` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_areasubroutes_modules_module_id` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `arrears`
--
ALTER TABLE `arrears`
  ADD CONSTRAINT `fk_arrears_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_arrears_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `assignmenthistory`
--
ALTER TABLE `assignmenthistory`
  ADD CONSTRAINT `fk_assignmenthistory_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_assignmenthistory_users_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `authorizedarearolepermissions`
--
ALTER TABLE `authorizedarearolepermissions`
  ADD CONSTRAINT `fk_accessarearolepermission_roles_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_accessrolepermissions_permissions_permission_id` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_authorizesarearolepermission_areas_area_id` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON DELETE NO ACTION;

--
-- Constraints for table `authorizedbusinessrolepermissions`
--
ALTER TABLE `authorizedbusinessrolepermissions`
  ADD CONSTRAINT `fk_authorizedbusinessrolepermissions_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`),
  ADD CONSTRAINT `fk_authorizedbusinessrolepermissions_permissions_permission_id` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`),
  ADD CONSTRAINT `fk_authorizedbusinessrolepermissions_roles_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`),
  ADD CONSTRAINT `fk_authorizedbusinessrolepermissions_users_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `bcpurchaseordercommunicationhistory`
--
ALTER TABLE `bcpurchaseordercommunicationhistory`
  ADD CONSTRAINT `fk_bcpocomhistory_bcpurchaseorders_bcpurchaseorders_id` FOREIGN KEY (`businessconsultingpurchaseorders_id`) REFERENCES `bcpurchaseorders` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_bcpocomhistory_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_bcpocomhistory_communicationtype_communicationtype_id` FOREIGN KEY (`communicationtype_id`) REFERENCES `communicationtype` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `billofquantities`
--
ALTER TABLE `billofquantities`
  ADD CONSTRAINT `fk_billofquantities_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `billofquantitiesdocuments`
--
ALTER TABLE `billofquantitiesdocuments`
  ADD CONSTRAINT `fk_billofquantitiesdocuments_billofquantities_billofquantity_id` FOREIGN KEY (`billofquantity_id`) REFERENCES `billofquantities` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `billofquantitiesrawmaterials`
--
ALTER TABLE `billofquantitiesrawmaterials`
  ADD CONSTRAINT `fk_bilofqtyrmtls_billofquantities_billofquantity_id` FOREIGN KEY (`billofquantity_id`) REFERENCES `billofquantities` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_bilofqtyrmtls_rowmaterials_rowmaterial_id` FOREIGN KEY (`rowmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `billofquantityconfigurations`
--
ALTER TABLE `billofquantityconfigurations`
  ADD CONSTRAINT `fk_boqconfigurations_billofquantities_billofquantity_id` FOREIGN KEY (`billofquantity_id`) REFERENCES `billofquantities` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `billofquantitydetails`
--
ALTER TABLE `billofquantitydetails`
  ADD CONSTRAINT `fk_billofquantitydetails_billofquantities_billofquantity_id` FOREIGN KEY (`billofquantity_id`) REFERENCES `billofquantities` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `billtypes`
--
ALTER TABLE `billtypes`
  ADD CONSTRAINT `fk_billtypes_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `bonus`
--
ALTER TABLE `bonus`
  ADD CONSTRAINT `fK_bonus_skilledcategory_skillcategory_id` FOREIGN KEY (`skilledcategory_id`) REFERENCES `skilledcategory` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_bonus_bonustypes_bonustype_id` FOREIGN KEY (`bonustype_id`) REFERENCES `bonustypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_bonus_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_bonus_months_month_id` FOREIGN KEY (`month_id`) REFERENCES `months` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_bonus_worksites_worksite_id` FOREIGN KEY (`worksite_id`) REFERENCES `worksites` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_bonus_year_year_id` FOREIGN KEY (`year_id`) REFERENCES `year` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `bookings`
--
ALTER TABLE `bookings`
  ADD CONSTRAINT `fk_bookings_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `branchlocation`
--
ALTER TABLE `branchlocation`
  ADD CONSTRAINT `fk_branchlocation_employees_employee_id` FOREIGN KEY (`employer_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `businessaddresses`
--
ALTER TABLE `businessaddresses`
  ADD CONSTRAINT `fk_businessaddresses_addresstypes_addresstype_id` FOREIGN KEY (`addresstype_id`) REFERENCES `addresstypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_businessaddresses_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_businessaddresses_employer_employer_id` FOREIGN KEY (`employer_id`) REFERENCES `employer` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `businessdocuments`
--
ALTER TABLE `businessdocuments`
  ADD CONSTRAINT `fk_businessdocuments_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_businessdocuments_documenttypes_documenttype_id` FOREIGN KEY (`documenttype_id`) REFERENCES `documenttypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `businesses`
--
ALTER TABLE `businesses`
  ADD CONSTRAINT `fk_businesses_cities_city_id` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`),
  ADD CONSTRAINT `fk_businesses_countries_country_id` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`),
  ADD CONSTRAINT `fk_businesses_currencies_currency_id` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`),
  ADD CONSTRAINT `fk_businesses_states_state_id` FOREIGN KEY (`state_id`) REFERENCES `states` (`id`);

--
-- Constraints for table `businessplan`
--
ALTER TABLE `businessplan`
  ADD CONSTRAINT `fk_businessplan_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_businessplan_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_businessplan_financialyears_financialyear_id` FOREIGN KEY (`financialyear_id`) REFERENCES `financialyears` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `businessplandetails`
--
ALTER TABLE `businessplandetails`
  ADD CONSTRAINT `fk_businessplandetails_businessplan_businessplan_id` FOREIGN KEY (`businessplan_id`) REFERENCES `businessplan` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_businessplandetails_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `businessplantargets`
--
ALTER TABLE `businessplantargets`
  ADD CONSTRAINT `fk_businessplantargets_businessplandetails_businessplandetail_id` FOREIGN KEY (`businessplandetail_id`) REFERENCES `businessplandetails` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_businessplantargets_months_month_id` FOREIGN KEY (`month_id`) REFERENCES `months` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_businessplantargets_year_year_id` FOREIGN KEY (`year_id`) REFERENCES `year` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `calendar`
--
ALTER TABLE `calendar`
  ADD CONSTRAINT `fk_calendar_employees_employee_id` FOREIGN KEY (`from_id`) REFERENCES `employees` (`id`) ON DELETE NO ACTION;

--
-- Constraints for table `cancelledserialnumbers`
--
ALTER TABLE `cancelledserialnumbers`
  ADD CONSTRAINT `fk_serialnumber_billtypes_billtype_id` FOREIGN KEY (`billtype_id`) REFERENCES `billtypes` (`id`),
  ADD CONSTRAINT `fk_serialnumber_months_month_id` FOREIGN KEY (`month_id`) REFERENCES `months` (`id`),
  ADD CONSTRAINT `fk_serialnumber_years_year_id` FOREIGN KEY (`year_id`) REFERENCES `year` (`id`);

--
-- Constraints for table `candidatecommunicationhistory`
--
ALTER TABLE `candidatecommunicationhistory`
  ADD CONSTRAINT `fk_candidatecomhistry_candidatecomtype_candidatecomtype_id` FOREIGN KEY (`candidatecommunicationtype_id`) REFERENCES `candidatecommunicationtype` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `candidatejobopenings`
--
ALTER TABLE `candidatejobopenings`
  ADD CONSTRAINT `fk_candidate_jobopenings_jobopening_id` FOREIGN KEY (`jobopening_id`) REFERENCES `jobopenings` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_candidatejobopening_calendar_calender_id` FOREIGN KEY (`calendar_id`) REFERENCES `calendar` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_candidatejobopening_interviewtypes_interviewtype_id` FOREIGN KEY (`interviewtype_id`) REFERENCES `interviewtypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_candidates_jobs_id_job_id` FOREIGN KEY (`jobopening_id`) REFERENCES `jobopenings` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `candidatemcqanswers`
--
ALTER TABLE `candidatemcqanswers`
  ADD CONSTRAINT `fk_candidatemcq_candidates_candidate_id` FOREIGN KEY (`candidate_id`) REFERENCES `candidatejobopenings` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_candidatemcqanswer_answers_answer_id` FOREIGN KEY (`answers_id`) REFERENCES `answers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_candidatemcqanswer_questionnaire_questionnaire_id` FOREIGN KEY (`questionnaire_id`) REFERENCES `questionnaire` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `candidatepastexperience`
--
ALTER TABLE `candidatepastexperience`
  ADD CONSTRAINT `fk_candidatepastexperience_candidates_candidate_id` FOREIGN KEY (`candidate_id`) REFERENCES `candidates` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `candidates`
--
ALTER TABLE `candidates`
  ADD CONSTRAINT `fk_candidates_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`);

--
-- Constraints for table `cashmemodetails`
--
ALTER TABLE `cashmemodetails`
  ADD CONSTRAINT `fk_cashmemodetails_businesses_businesses_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_cashmemodetails_cashmemo_cashmemo_id` FOREIGN KEY (`cashmemo_id`) REFERENCES `cashmemos` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `cashmemos`
--
ALTER TABLE `cashmemos`
  ADD CONSTRAINT `fk_cashmemo_customer_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_cashmemo_employee_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_cashmemo_invoicetype_invoicetype_id` FOREIGN KEY (`invoicetype_id`) REFERENCES `invoicetypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_caskmemo_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `commissionconfigurations`
--
ALTER TABLE `commissionconfigurations`
  ADD CONSTRAINT `fk_commissionconfigurations_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `commissions`
--
ALTER TABLE `commissions`
  ADD CONSTRAINT `fk_commissions_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_commissions_partners_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`);

--
-- Constraints for table `communicationhistory`
--
ALTER TABLE `communicationhistory`
  ADD CONSTRAINT `fk_communicationhistory_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_communicationhistory_caledar_calendar_id` FOREIGN KEY (`calendar_id`) REFERENCES `calendar` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_communicationhistory_communicationtype_communicationtype_id` FOREIGN KEY (`communicationtype_id`) REFERENCES `communicationtype` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_communicationhistory_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `communicationhistoryaudit`
--
ALTER TABLE `communicationhistoryaudit`
  ADD CONSTRAINT `fk_communicationhistoryaudit_communicationhistory_id` FOREIGN KEY (`communicationhistory_id`) REFERENCES `communicationhistory` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `communicationtype`
--
ALTER TABLE `communicationtype`
  ADD CONSTRAINT `fk_communicationtype_comtypegroups_comtypegroup_id` FOREIGN KEY (`communicationtypegroup_id`) REFERENCES `communicationtypegroups` (`id`);

--
-- Constraints for table `companygoals`
--
ALTER TABLE `companygoals`
  ADD CONSTRAINT `fk_companygoals_department_department_id` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `companygoalsdetails`
--
ALTER TABLE `companygoalsdetails`
  ADD CONSTRAINT `fk_companygoalsdetails__companygoals_companygoal_id` FOREIGN KEY (`companygoal_id`) REFERENCES `companygoals` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_companygoalsdetails_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `complaintdocuments`
--
ALTER TABLE `complaintdocuments`
  ADD CONSTRAINT `fk_complaintdocuments_complaints_complaint_id` FOREIGN KEY (`complaint_id`) REFERENCES `complaints` (`id`),
  ADD CONSTRAINT `fk_complaintdocuments_documenttypes_documenttype_id` FOREIGN KEY (`documenttype_id`) REFERENCES `documenttypes` (`id`);

--
-- Constraints for table `complaintfeedbackanswers`
--
ALTER TABLE `complaintfeedbackanswers`
  ADD CONSTRAINT `fk_complaintfeedbackanswers_answers_answer_id` FOREIGN KEY (`answer_id`) REFERENCES `answers` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `complaintproductdetails`
--
ALTER TABLE `complaintproductdetails`
  ADD CONSTRAINT `fk_complaintproductdetails_complaints_complaint_id ` FOREIGN KEY (`complaint_id`) REFERENCES `complaints` (`id`),
  ADD CONSTRAINT `fk_complaintproductdetails_products_product_id ` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);

--
-- Constraints for table `complaints`
--
ALTER TABLE `complaints`
  ADD CONSTRAINT `fk_complaints_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_complaints_calendar_calendar_id` FOREIGN KEY (`calendar_id`) REFERENCES `calendar` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_complaints_compalintstatus_status_id` FOREIGN KEY (`complaintstatus_id`) REFERENCES `complaintstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_complaints_complaintpaymentstatus_complaintpaymentstatus_id` FOREIGN KEY (`complaintpaymentstatus_id`) REFERENCES `complaintpaymentstatus` (`id`),
  ADD CONSTRAINT `fk_complaints_complaintstatus_complaintstatus_id` FOREIGN KEY (`complaintstatus_id`) REFERENCES `jobworkstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_complaints_complainttypes_complainttype_id` FOREIGN KEY (`complainttype_id`) REFERENCES `complainttypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_complaints_invoicetypes_invoicetype_id` FOREIGN KEY (`invoicetype_id`) REFERENCES `invoicetypes` (`id`);

--
-- Constraints for table `costcarddetails`
--
ALTER TABLE `costcarddetails`
  ADD CONSTRAINT `fk_costcarddetails_brands_brand_id` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`),
  ADD CONSTRAINT `fk_costcarddetails_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_costcarddetails_categories_category_id` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`),
  ADD CONSTRAINT `fk_costcarddetails_costcards_costcard_id` FOREIGN KEY (`costcard_id`) REFERENCES `costcards` (`id`),
  ADD CONSTRAINT `fk_costcarddetails_rawmaterial_rawmaterial_id` FOREIGN KEY (`rawmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_costcarddetails_sizes_size_id` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`id`),
  ADD CONSTRAINT `fk_costcarddetails_subcategories_subcategories_id` FOREIGN KEY (`subcategory_id`) REFERENCES `subcategories` (`id`);

--
-- Constraints for table `costcards`
--
ALTER TABLE `costcards`
  ADD CONSTRAINT `fk_costcards_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `courieres`
--
ALTER TABLE `courieres`
  ADD CONSTRAINT `fk_courieres_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_courieres_paymentstatus_paymentstatus_id` FOREIGN KEY (`paymentstatus_id`) REFERENCES `paymentstatus` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `creditnotedetails`
--
ALTER TABLE `creditnotedetails`
  ADD CONSTRAINT `fk_creditnotedetails_creditnotes_creditnote_id` FOREIGN KEY (`creditnote_id`) REFERENCES `creditnotes` (`id`),
  ADD CONSTRAINT `fk_creditnotedetails_gstslabs_gstslab_id` FOREIGN KEY (`gstslab_id`) REFERENCES `gstslabs` (`id`),
  ADD CONSTRAINT `fk_creditnotedetails_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);

--
-- Constraints for table `creditnotes`
--
ALTER TABLE `creditnotes`
  ADD CONSTRAINT `fk_creditnotes_creditnotestatus_status_id` FOREIGN KEY (`status_id`) REFERENCES `creditnotestatus` (`id`),
  ADD CONSTRAINT `fk_creditnotes_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `fk_creditnotes_invoices_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`);

--
-- Constraints for table `customeraddresses`
--
ALTER TABLE `customeraddresses`
  ADD CONSTRAINT `fk_customeraddresses_addresstypes_addresstype_id` FOREIGN KEY (`addresstype_id`) REFERENCES `addresstypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customeraddresses_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `customercommunicationlogs`
--
ALTER TABLE `customercommunicationlogs`
  ADD CONSTRAINT `fk_communicationmodes_communicationmode_id` FOREIGN KEY (`communicationmode_id`) REFERENCES `communicationmodes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customercommunicationtypes_customercommunicationtype_id` FOREIGN KEY (`customercommunicationtype_id`) REFERENCES `customercommunicationtypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_templates_templatetype_id` FOREIGN KEY (`templatetype_id`) REFERENCES `templates` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `customerdocuments`
--
ALTER TABLE `customerdocuments`
  ADD CONSTRAINT `fk_customerdocuments_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `fk_customerdocuments_documenttypes_documenttype_id` FOREIGN KEY (`documenttype_id`) REFERENCES `documenttypes` (`id`);

--
-- Constraints for table `customerproductcategories`
--
ALTER TABLE `customerproductcategories`
  ADD CONSTRAINT `fk_customerproductcategories_categories_category_id` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`),
  ADD CONSTRAINT `fk_customerproductcategories_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`);

--
-- Constraints for table `customerquestionnaire`
--
ALTER TABLE `customerquestionnaire`
  ADD CONSTRAINT `fk_customerquestionnaire_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customerquestionnaire_leadquestionnaire_leadquestionnaire_id` FOREIGN KEY (`leadquestionnaire_id`) REFERENCES `questionnaire` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `customers`
--
ALTER TABLE `customers`
  ADD CONSTRAINT `fk_customers_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customers_contacttypes_contacttype_id` FOREIGN KEY (`designation_id`) REFERENCES `designations` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customers_customerstatus_customerstatus_id` FOREIGN KEY (`customerstatus_id`) REFERENCES `customerstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customers_customertypes_customertype_id` FOREIGN KEY (`customertype_id`) REFERENCES `customertypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customers_designations_designation_id` FOREIGN KEY (`designation_id`) REFERENCES `designations` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customers_leadsources_leadsource_id` FOREIGN KEY (`leadsource_id`) REFERENCES `leadsources` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customers_partners_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_cusyomers_categories_category_id` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `customersocialmedia`
--
ALTER TABLE `customersocialmedia`
  ADD CONSTRAINT `fk_customersocialmedia_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`);

--
-- Constraints for table `debitnotedetails`
--
ALTER TABLE `debitnotedetails`
  ADD CONSTRAINT `fk_debitnotedetails_debitnotes_debitnote_id` FOREIGN KEY (`debitnote_id`) REFERENCES `debitnotes` (`id`),
  ADD CONSTRAINT `fk_debitnotedetails_gstslabs_gstslab_id` FOREIGN KEY (`gstslab_id`) REFERENCES `gstslabs` (`id`),
  ADD CONSTRAINT `fk_debitnotedetails_rawmaterials_rawmaterial_id` FOREIGN KEY (`rawmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `debitnotes`
--
ALTER TABLE `debitnotes`
  ADD CONSTRAINT `fk_debitnotes_creditnotestatus_status_id` FOREIGN KEY (`status_id`) REFERENCES `creditnotestatus` (`id`),
  ADD CONSTRAINT `fk_debitnotes_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`);

--
-- Constraints for table `directors`
--
ALTER TABLE `directors`
  ADD CONSTRAINT `fk_directors_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `employeebankdetails`
--
ALTER TABLE `employeebankdetails`
  ADD CONSTRAINT `fk_employeebankdetails_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `employeedocuments`
--
ALTER TABLE `employeedocuments`
  ADD CONSTRAINT `fk_employeedocuments_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `employeefamilydetails`
--
ALTER TABLE `employeefamilydetails`
  ADD CONSTRAINT `fk_employeefamilydetails_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `fk_employeefamilydetails_relationships_relationship_id` FOREIGN KEY (`relationship_id`) REFERENCES `relationships` (`id`);

--
-- Constraints for table `employeeofficialdetails`
--
ALTER TABLE `employeeofficialdetails`
  ADD CONSTRAINT `fk_employeeofficaildetails_departments_department_id` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeeofficaildetails_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeeofficialdetails_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeeofficialdetails_employeetypes_employeetype_id` FOREIGN KEY (`employeetype_id`) REFERENCES `employeetypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeeofficialdetails_jobtitles_jobtitle_id` FOREIGN KEY (`jobtitle_id`) REFERENCES `jobtitles` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeeofficialdetails_skilledcategory_id` FOREIGN KEY (`skilledcategory_id`) REFERENCES `skilledcategory` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeeofficialdetails_worksites_worksite_id` FOREIGN KEY (`worksite_id`) REFERENCES `worksites` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `employeepayrolldetails`
--
ALTER TABLE `employeepayrolldetails`
  ADD CONSTRAINT `fk_employeepayrolldetails_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeepayrolldetails_payouttypes_payouttype_id` FOREIGN KEY (`payouttype_id`) REFERENCES `payouttypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `employees`
--
ALTER TABLE `employees`
  ADD CONSTRAINT `fk_employees_bloodgroups_bloodgroup_id` FOREIGN KEY (`bloodgroup_id`) REFERENCES `bloodgroups` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employees_boilersuitesizes_boilersuitesize_id` FOREIGN KEY (`boilersuitsize_id`) REFERENCES `boilersuitsizes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employees_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employees_safetyshoessizes_safetyshoessize_id` FOREIGN KEY (`safetyshoessize_id`) REFERENCES `safetyshoessizes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `employeetrainings`
--
ALTER TABLE `employeetrainings`
  ADD CONSTRAINT `fk_employeetrainings_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeetrainings_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeetrainings_training_id` FOREIGN KEY (`training_id`) REFERENCES `trainings` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employeetrainings_users_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `employerconfigurations`
--
ALTER TABLE `employerconfigurations`
  ADD CONSTRAINT `fk_employerconfigurations_busineess_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `enquiries`
--
ALTER TABLE `enquiries`
  ADD CONSTRAINT `fk_enquiries_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_enquiries_cities_city_id` FOREIGN KEY (`city_id`) REFERENCES `cities` (`id`),
  ADD CONSTRAINT `fk_enquiries_countries_country_id` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`),
  ADD CONSTRAINT `fk_enquiries_customeraddresses_address_id` FOREIGN KEY (`address_id`) REFERENCES `customeraddresses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_enquiries_customers_client_id` FOREIGN KEY (`client_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `fk_enquiries_customertypes_customertype_id` FOREIGN KEY (`customertype_id`) REFERENCES `customertypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_enquiries_enquirystatus_enquirystatus_id` FOREIGN KEY (`enquirystatus_id`) REFERENCES `enquirystatus` (`id`),
  ADD CONSTRAINT `fk_enquiries_enquirytypes_enquirytype_id` FOREIGN KEY (`enquirytype_id`) REFERENCES `enquirytypes` (`id`),
  ADD CONSTRAINT `fk_enquiries_leadsources_leadsource_id` FOREIGN KEY (`leadsource_id`) REFERENCES `leadsources` (`id`),
  ADD CONSTRAINT `fk_enquiries_months_month_id` FOREIGN KEY (`month_id`) REFERENCES `months` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_enquiries_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
  ADD CONSTRAINT `fk_enquiries_states_state_id` FOREIGN KEY (`state_id`) REFERENCES `states` (`id`),
  ADD CONSTRAINT `fk_enquiries_year_year_id` FOREIGN KEY (`year_id`) REFERENCES `year` (`id`);

--
-- Constraints for table `enquirycommunicationhistory`
--
ALTER TABLE `enquirycommunicationhistory`
  ADD CONSTRAINT `fk_enquirycommunicationhistory_commutype_communicationtype_id` FOREIGN KEY (`communicationtype_id`) REFERENCES `communicationtype` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `enquirydetails`
--
ALTER TABLE `enquirydetails`
  ADD CONSTRAINT `fk_enquirydetails_enquiry_enquiry_id` FOREIGN KEY (`enquiry_id`) REFERENCES `enquiries` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_enquirydetails_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `enquirydocuments`
--
ALTER TABLE `enquirydocuments`
  ADD CONSTRAINT `fk_enquirydocuments_documenttypes_documenttype_id` FOREIGN KEY (`documenttype_id`) REFERENCES `documenttypes` (`id`),
  ADD CONSTRAINT `fk_enquirydocuments_enquiries_enquiry_id` FOREIGN KEY (`enquiry_id`) REFERENCES `enquiries` (`id`);

--
-- Constraints for table `ewaybill`
--
ALTER TABLE `ewaybill`
  ADD CONSTRAINT `ewaybill_invoices_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `ewaybill_transactionsubtypes_transactionsubtype_id` FOREIGN KEY (`transactionsubtype_id`) REFERENCES `transactionsubtypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `ewaybill_transportationtypes_transportation_id` FOREIGN KEY (`transportationtype_id`) REFERENCES `transportationtypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `ewaybill_vehicletypes_vehicletype_id` FOREIGN KEY (`vehicletype_id`) REFERENCES `vehicletypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `feedbackquestions`
--
ALTER TABLE `feedbackquestions`
  ADD CONSTRAINT `fk_feedbackquestions_controltypes_controltype_id` FOREIGN KEY (`controltype_id`) REFERENCES `controltypes` (`id`) ON UPDATE CASCADE;

--
-- Constraints for table `foodallowances`
--
ALTER TABLE `foodallowances`
  ADD CONSTRAINT `fK_foodallowances_skilledcategory_skillcategory_id` FOREIGN KEY (`skillcategory_id`) REFERENCES `skilledcategory` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fK_foodallowances_worksites_worksite_id` FOREIGN KEY (`worksite_id`) REFERENCES `worksites` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `goals`
--
ALTER TABLE `goals`
  ADD CONSTRAINT `goals_department_id_departments_id` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `incentives`
--
ALTER TABLE `incentives`
  ADD CONSTRAINT `fk_incentives_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_incentives_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `incidents`
--
ALTER TABLE `incidents`
  ADD CONSTRAINT `fk_incidents_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `invoiceadditionalcharges`
--
ALTER TABLE `invoiceadditionalcharges`
  ADD CONSTRAINT `fk_invadditionalcharges_chargetypes_chargetype_id` FOREIGN KEY (`chargetype_id`) REFERENCES `chargetypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_invadditionalcharges_invoice_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `invoiceconfigurations`
--
ALTER TABLE `invoiceconfigurations`
  ADD CONSTRAINT `fk_invoiceconfigurations_invoices_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `invoicedetails`
--
ALTER TABLE `invoicedetails`
  ADD CONSTRAINT `fk_invoicedetails_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_invoicedetails_gstslabs_gstslab_id` FOREIGN KEY (`gstslab_id`) REFERENCES `gstslabs` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_invoicedetails_invoices_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_invoicedetails_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `invoicedocuments`
--
ALTER TABLE `invoicedocuments`
  ADD CONSTRAINT `fk_invoicedocuments_invoices_invoice_id` FOREIGN KEY (`invoice_id`) REFERENCES `invoices` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `invoices`
--
ALTER TABLE `invoices`
  ADD CONSTRAINT `fk_invoices_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_invoices_customer_id_customers` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_invoices_invoicereferencetypes_invoicereferencetype_id` FOREIGN KEY (`invoicereferencetype_id`) REFERENCES `invoicereferencetypes` (`id`),
  ADD CONSTRAINT `fk_invoices_invoicestatus_invoicestatus_id` FOREIGN KEY (`invoicestatus_id`) REFERENCES `invoicestatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_invoices_invoicetypes_invoicetype_id` FOREIGN KEY (`invoicetype_id`) REFERENCES `invoicetypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_invoices_invpaymentstatus_invoicepaymentstatus_id` FOREIGN KEY (`invoicepaymentstatus_id`) REFERENCES `invoicepaymentstatus` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `issues`
--
ALTER TABLE `issues`
  ADD CONSTRAINT `fk_issues_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`),
  ADD CONSTRAINT `fk_issues_issuestatus_issuestatus_id` FOREIGN KEY (`issuestatus_id`) REFERENCES `issuestatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_issues_task_id_tasks_id` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `jobkpis`
--
ALTER TABLE `jobkpis`
  ADD CONSTRAINT `fk_job_jobkpi_id` FOREIGN KEY (`job_id`) REFERENCES `jobopenings` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_kpi_jobkpi_id` FOREIGN KEY (`kpi_id`) REFERENCES `kpi` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `jobkras`
--
ALTER TABLE `jobkras`
  ADD CONSTRAINT `fk_job_jobkras_id` FOREIGN KEY (`job_id`) REFERENCES `jobopenings` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_kra_jobkras_id` FOREIGN KEY (`kra_id`) REFERENCES `kra` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `jobopeningassignmenthistory`
--
ALTER TABLE `jobopeningassignmenthistory`
  ADD CONSTRAINT `fk_jobassignmenthistory_jobopenings_jobopening_id` FOREIGN KEY (`jobopening_id`) REFERENCES `jobopenings` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `jobplannings`
--
ALTER TABLE `jobplannings`
  ADD CONSTRAINT `fk_jobplannings_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `jobplanningworkflowdetails`
--
ALTER TABLE `jobplanningworkflowdetails`
  ADD CONSTRAINT `jobworkflowdetails_joblainning_jobplanning_id` FOREIGN KEY (`jobplanning_id`) REFERENCES `jobplannings` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `jobworkflowdetails_jobplanningworkflow_jobplanningworkflow_id` FOREIGN KEY (`jobplanningworkflow_id`) REFERENCES `jobplanningworkflow` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `jobworkflowdetails_jobplanningworkflowstatus_jobplaningstatus_id` FOREIGN KEY (`jobplanningworkflowstatus_id`) REFERENCES `jobplanningworkflowstatus` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `jobtitles`
--
ALTER TABLE `jobtitles`
  ADD CONSTRAINT `fK_jobtitle_skilledcategory_skillcategory_id` FOREIGN KEY (`skillcategory_id`) REFERENCES `skilledcategory` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `jobworkdocuments`
--
ALTER TABLE `jobworkdocuments`
  ADD CONSTRAINT `fk_jobworkdocuments_documenttypes_documenttype_id` FOREIGN KEY (`documenttype_id`) REFERENCES `documenttypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_jobworkdocuments_jobworks_jobwork_id ` FOREIGN KEY (`jobwork_id`) REFERENCES `jobworks` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `jobworks`
--
ALTER TABLE `jobworks`
  ADD CONSTRAINT `fk_jobworks_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_jobworks_calendar_calendar_id` FOREIGN KEY (`calendar_id`) REFERENCES `calendar` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_jobworks_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_jobworks_jobworkpaymentstatus_jobworkpaymentstatus_id` FOREIGN KEY (`jobworkpaymentstatus_id`) REFERENCES `jobworkpaymentstatus` (`id`),
  ADD CONSTRAINT `fk_jobworks_jobworktypes_jobworktype_id` FOREIGN KEY (`jobworktype_id`) REFERENCES `jobworktypes` (`id`),
  ADD CONSTRAINT `fk_jobworks_servicetypes_servicetype_id` FOREIGN KEY (`servicetype_id`) REFERENCES `servicetypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `kpi`
--
ALTER TABLE `kpi`
  ADD CONSTRAINT `fk_kpi_departments_department_id` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_kpi_roles_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `leadqualificationanswers`
--
ALTER TABLE `leadqualificationanswers`
  ADD CONSTRAINT `fk_customerleadqualification_answers_answers_id` FOREIGN KEY (`answer_id`) REFERENCES `answers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customerleadqualification_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_customerleadqualification_questionnaire_questionnaire_id` FOREIGN KEY (`questionnaire_id`) REFERENCES `questionnaire` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `leadsources`
--
ALTER TABLE `leadsources`
  ADD CONSTRAINT `fk_leadsources_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `leaveapplication`
--
ALTER TABLE `leaveapplication`
  ADD CONSTRAINT `fk_leaveapplication_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `leaveapplicationdetails`
--
ALTER TABLE `leaveapplicationdetails`
  ADD CONSTRAINT `fk_leavedetails_leaveapplication_leaveapplication_id` FOREIGN KEY (`leaveapplication_id`) REFERENCES `leaveapplication` (`id`);

--
-- Constraints for table `loanrepayments`
--
ALTER TABLE `loanrepayments`
  ADD CONSTRAINT `fk_loanrepayments_loans_loan_id` FOREIGN KEY (`loan_id`) REFERENCES `loans` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `loans`
--
ALTER TABLE `loans`
  ADD CONSTRAINT `fk_loans_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `loanschedules`
--
ALTER TABLE `loanschedules`
  ADD CONSTRAINT `fk_loanschedules_loans_loan_id` FOREIGN KEY (`loan_id`) REFERENCES `loans` (`id`),
  ADD CONSTRAINT `fk_loanschedules_loanschedulestatus_loanschedulestatus_id` FOREIGN KEY (`loanschedulestatus_id`) REFERENCES `loanschedulestatus` (`id`);

--
-- Constraints for table `logisticsdetails`
--
ALTER TABLE `logisticsdetails`
  ADD CONSTRAINT `fk_logisticsdetails_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_logisticsdetails_logisticspaymentstatus_id` FOREIGN KEY (`paymentstatus_id`) REFERENCES `logisticspaymentstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_logisticsdetails_salesorder_salesorder_id` FOREIGN KEY (`salesorder_id`) REFERENCES `salesorder` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `lwfsettings`
--
ALTER TABLE `lwfsettings`
  ADD CONSTRAINT `fk_lwfsettings_months_month_id` FOREIGN KEY (`month_id`) REFERENCES `months` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_lwfsettings_year_year_id` FOREIGN KEY (`year_id`) REFERENCES `year` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `mcqanswers`
--
ALTER TABLE `mcqanswers`
  ADD CONSTRAINT `fk_mcqanswers_mcqquestionnaire_mcqquestionnaire_id` FOREIGN KEY (`mcqquestionnaire_id`) REFERENCES `mcqquestionnaire` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `moduleareas`
--
ALTER TABLE `moduleareas`
  ADD CONSTRAINT `fk_modulearea_areas_area_id` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_moduleareas_modules_module_id` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `modules`
--
ALTER TABLE `modules`
  ADD CONSTRAINT `fk_modules_applicationtypes_applicationtype_id` FOREIGN KEY (`applicationtype_id`) REFERENCES `applicationtypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `notifications`
--
ALTER TABLE `notifications`
  ADD CONSTRAINT `fk_notifications_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `orderworkflowdetails`
--
ALTER TABLE `orderworkflowdetails`
  ADD CONSTRAINT `fk_orderworkflow_orderworkflow_id` FOREIGN KEY (`orderworkflow_id`) REFERENCES `orderworkflow` (`id`),
  ADD CONSTRAINT `fk_orderworkflowstatus_orderworkflowstatus_id` FOREIGN KEY (`orderworkflowstatus_id`) REFERENCES `orderworkflowstatus` (`id`);

--
-- Constraints for table `orientation`
--
ALTER TABLE `orientation`
  ADD CONSTRAINT `fk_orientation_departments_department_id` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `orientationanswers`
--
ALTER TABLE `orientationanswers`
  ADD CONSTRAINT `fk_orientationanswers_orientationquestionnaire_questionnaire_id` FOREIGN KEY (`orientationquestionnaire_id`) REFERENCES `orientationquestionnaire` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `orientationquestionnaire`
--
ALTER TABLE `orientationquestionnaire`
  ADD CONSTRAINT `fk_orientationquestionnarie_orienatation_orientation_id` FOREIGN KEY (`orientation_id`) REFERENCES `orientation` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `overheadcost`
--
ALTER TABLE `overheadcost`
  ADD CONSTRAINT `fk_overheadcost_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `partneraddresses`
--
ALTER TABLE `partneraddresses`
  ADD CONSTRAINT `fk_partneraddresses_addresstypes_addresstype_id` FOREIGN KEY (`addresstype_id`) REFERENCES `addresstypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_partneraddresses_partners_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `partneranswers`
--
ALTER TABLE `partneranswers`
  ADD CONSTRAINT `fk_partneranswers_partnerquestionnaire_partnerquestionnaire_id` FOREIGN KEY (`partnerquestionnaire_id`) REFERENCES `partnerquestionnaire` (`id`),
  ADD CONSTRAINT `fk_partneranswers_partners_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`);

--
-- Constraints for table `partnerbankdetails`
--
ALTER TABLE `partnerbankdetails`
  ADD CONSTRAINT `fk_partnerbankdetails_partners_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`);

--
-- Constraints for table `partnercommunicationhistory`
--
ALTER TABLE `partnercommunicationhistory`
  ADD CONSTRAINT `fk_comhistory_comtype_comtype_id	` FOREIGN KEY (`partnercommunicationtype_id`) REFERENCES `partnercommunicationtype` (`id`),
  ADD CONSTRAINT `fk_partnercommunicationhistory_calendar_calendar_id` FOREIGN KEY (`calendar_id`) REFERENCES `calendar` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_partnercommunicationhistory_partners_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `partnerdocuments`
--
ALTER TABLE `partnerdocuments`
  ADD CONSTRAINT `fk_partnerdocuments_partners_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`);

--
-- Constraints for table `partnerreferrals`
--
ALTER TABLE `partnerreferrals`
  ADD CONSTRAINT `fk_partnerreferrals_partners_partner_id` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`),
  ADD CONSTRAINT `partnerreferrals_ibfk_1` FOREIGN KEY (`partner_id`) REFERENCES `partners` (`id`);

--
-- Constraints for table `partners`
--
ALTER TABLE `partners`
  ADD CONSTRAINT `fk_partners_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `fk_partners_partnerstatus_status_id` FOREIGN KEY (`partnerstatus_id`) REFERENCES `partnerstatus` (`id`),
  ADD CONSTRAINT `fk_partners_partnertypes_partnertype_id` FOREIGN KEY (`partnertype_id`) REFERENCES `partnertypes` (`id`);

--
-- Constraints for table `payments`
--
ALTER TABLE `payments`
  ADD CONSTRAINT `fk_payments_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_payments_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `fk_payments_invoicetypes_invoicetype_id` FOREIGN KEY (`invoicetype_id`) REFERENCES `invoicetypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_payments_paymentmodes_paymentmode_id` FOREIGN KEY (`paymentmode_id`) REFERENCES `paymentmodes` (`id`) ON UPDATE CASCADE;

--
-- Constraints for table `paymentslip`
--
ALTER TABLE `paymentslip`
  ADD CONSTRAINT `fk_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`),
  ADD CONSTRAINT `fk_paymentcycle_paymentcycle_id` FOREIGN KEY (`paymentcycle_id`) REFERENCES `paymentcycle` (`id`),
  ADD CONSTRAINT `fk_paymentslipstatus_paymentslipstatus_id` FOREIGN KEY (`paymentslipstatus_id`) REFERENCES `paymentslipstatus` (`id`);

--
-- Constraints for table `paymentslipconfigurations`
--
ALTER TABLE `paymentslipconfigurations`
  ADD CONSTRAINT `fk_paymentslipconfigurations_paymentslip_paymentslip_id` FOREIGN KEY (`paymentslip_id`) REFERENCES `paymentslip` (`id`);

--
-- Constraints for table `paymentslipdetails`
--
ALTER TABLE `paymentslipdetails`
  ADD CONSTRAINT `fk_gstslabs_gstslabs_id` FOREIGN KEY (`gstslabs_id`) REFERENCES `gstslabs` (`id`),
  ADD CONSTRAINT `fk_paymentslip_paymentslip_id` FOREIGN KEY (`paymentslip_id`) REFERENCES `paymentslip` (`id`),
  ADD CONSTRAINT `fk_usertype_usertype_id` FOREIGN KEY (`usertype_id`) REFERENCES `usertype` (`id`);

--
-- Constraints for table `payrolllogs`
--
ALTER TABLE `payrolllogs`
  ADD CONSTRAINT `fk_payrolllogs_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`);

--
-- Constraints for table `payslip`
--
ALTER TABLE `payslip`
  ADD CONSTRAINT `fk_payslip_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_payslip_payslipstatus_payslipstatus_id` FOREIGN KEY (`payslipstatus_id`) REFERENCES `payslipstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_payslip_worksites_worksite_id` FOREIGN KEY (`worksite_id`) REFERENCES `worksites` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `performancekpi`
--
ALTER TABLE `performancekpi`
  ADD CONSTRAINT `fk_performancekpi_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_performancekpi_users_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `performancekpidetails`
--
ALTER TABLE `performancekpidetails`
  ADD CONSTRAINT `fk_kpidetails_kpi_kpi_id` FOREIGN KEY (`kpi_id`) REFERENCES `kpi` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_kpidetails_performancekpi_id_performance_id` FOREIGN KEY (`performancekpi_id`) REFERENCES `performancekpi` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_performancekpidetails_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `processingcenterlogs`
--
ALTER TABLE `processingcenterlogs`
  ADD CONSTRAINT `processingcenterlogs_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `procurementdetails`
--
ALTER TABLE `procurementdetails`
  ADD CONSTRAINT `fk_procurementdetails_procurements_procurement_id` FOREIGN KEY (`procurement_id`) REFERENCES `procurements` (`id`);

--
-- Constraints for table `procurements`
--
ALTER TABLE `procurements`
  ADD CONSTRAINT `fk_procurements_procurementstatus_procurementstatus_id` FOREIGN KEY (`procurementstatus_id`) REFERENCES `procurementstatus` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `productinventory`
--
ALTER TABLE `productinventory`
  ADD CONSTRAINT `fk_inventory_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_productinventory_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `productinventorystockin`
--
ALTER TABLE `productinventorystockin`
  ADD CONSTRAINT `fk_inventorystockin_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_productinventorystockin_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_productinventorystockin_inventorystatus_inventorystatus_id` FOREIGN KEY (`inventorystatus_id`) REFERENCES `inventorystatus` (`id`),
  ADD CONSTRAINT `fk_productinventorystockin_suppliers_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_productinventorystockin_warehouses_warehouse_id` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `productinventorystockout`
--
ALTER TABLE `productinventorystockout`
  ADD CONSTRAINT `fk_inventorystockout_inventorystockin_inventorystockin_id` FOREIGN KEY (`inventorystockin_id`) REFERENCES `productinventorystockin` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_inventorystockout_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_productinventorystockout_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_productinventorystockout_referencetypes_referencetype_id` FOREIGN KEY (`orderreferencetype_id`) REFERENCES `orderreferencetypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `productionplanning`
--
ALTER TABLE `productionplanning`
  ADD CONSTRAINT `fk_productionplanning_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `productpurchaseorderdetails`
--
ALTER TABLE `productpurchaseorderdetails`
  ADD CONSTRAINT `fk_prdctpurchsordrdetls_prdctprchsorders_productpurchaseorder_id` FOREIGN KEY (`productpurchaseorder_id`) REFERENCES `productpurchaseorders` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_purchasedetails_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_purchasedetails_purchaseorders_purchaseorder_id` FOREIGN KEY (`productpurchaseorder_id`) REFERENCES `productpurchaseorders` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `productpurchaseorders`
--
ALTER TABLE `productpurchaseorders`
  ADD CONSTRAINT `fk_productpurchaseorders_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_purchaseorders_purchaseorderstatus_status_id` FOREIGN KEY (`status_id`) REFERENCES `purchaseorderstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_purchaseorders_suppliers_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `products`
--
ALTER TABLE `products`
  ADD CONSTRAINT `fk_products_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_products_categories_category_id` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_products_measurementtypes_measurementtype_id` FOREIGN KEY (`measurementtype_id`) REFERENCES `measurementtypes` (`id`);

--
-- Constraints for table `productstockadjustment`
--
ALTER TABLE `productstockadjustment`
  ADD CONSTRAINT `fk_stockadjustment_adjustmenttype_adjustmenttype_ide` FOREIGN KEY (`adjustmenttype_id`) REFERENCES `adjustmenttype` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `productstocklimits`
--
ALTER TABLE `productstocklimits`
  ADD CONSTRAINT `fk_productstocklimits_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_stocklimits_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);

--
-- Constraints for table `professionaltax`
--
ALTER TABLE `professionaltax`
  ADD CONSTRAINT `fk_professionaltax_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `projectassignmenthistory`
--
ALTER TABLE `projectassignmenthistory`
  ADD CONSTRAINT `fk_projectassignmenthistory_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_projectassignmenthistory_jobtitles_jobtitle_id` FOREIGN KEY (`jobtitle_id`) REFERENCES `jobtitles` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_projectassignmenthistory_projects_project_id` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `projects`
--
ALTER TABLE `projects`
  ADD CONSTRAINT `fk_projects_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`),
  ADD CONSTRAINT `fk_projects_calendar_calendar_id` FOREIGN KEY (`calendar_id`) REFERENCES `calendar` (`id`);

--
-- Constraints for table `publicholiday`
--
ALTER TABLE `publicholiday`
  ADD CONSTRAINT `fk_publicholiday_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `questionnaire`
--
ALTER TABLE `questionnaire`
  ADD CONSTRAINT `fk_questionnaire_controltypes_controltype_id` FOREIGN KEY (`controltype_id`) REFERENCES `controltypes` (`id`),
  ADD CONSTRAINT `fk_questionnaire_questionnairetypes_questionnairetype_id` FOREIGN KEY (`questionnairetype_id`) REFERENCES `questionnairetypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `quotationadditionalcharges`
--
ALTER TABLE `quotationadditionalcharges`
  ADD CONSTRAINT `fk_quoteadditionalcharges_chargetypes_chargetype_id` FOREIGN KEY (`chargetype_id`) REFERENCES `chargetypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_quoteadditionalcharges_quotation_quotation_id` FOREIGN KEY (`quotation_id`) REFERENCES `quotations` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `quotationconfigurations`
--
ALTER TABLE `quotationconfigurations`
  ADD CONSTRAINT `fk_quotationconfigurations_quotations_quotation_id` FOREIGN KEY (`quotation_id`) REFERENCES `quotations` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `quotationdetails`
--
ALTER TABLE `quotationdetails`
  ADD CONSTRAINT `fk_quotationdetails_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_quotationdetails_quotation_quotation_id` FOREIGN KEY (`quotation_id`) REFERENCES `quotations` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `quotationdocuments`
--
ALTER TABLE `quotationdocuments`
  ADD CONSTRAINT `fk_quotationdocuments_quotations_quotation_id` FOREIGN KEY (`quotation_id`) REFERENCES `quotations` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `quotations`
--
ALTER TABLE `quotations`
  ADD CONSTRAINT `fk_quotations_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_quotations_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `rawmaterialinventory`
--
ALTER TABLE `rawmaterialinventory`
  ADD CONSTRAINT `fk_iteminventory_items_item_id` FOREIGN KEY (`rawmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_iteminventory_unit_unittype_id` FOREIGN KEY (`unittype_id`) REFERENCES `unit` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialinventory_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialinventory_rawmaterials_rawmaterial_id` FOREIGN KEY (`rawmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `rawmaterialinventorystockin`
--
ALTER TABLE `rawmaterialinventorystockin`
  ADD CONSTRAINT `fk_rawmaterialinventorystockin_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialinventorystockin_rawmaterials_rawmaterial_id` FOREIGN KEY (`rawmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialinventorystockin_suppliers_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialinventorystockin_warehouses_warehouse_id` FOREIGN KEY (`warehouse_id`) REFERENCES `warehouses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmtrlinventorystockin_inventorystatus_inventorystatus_id` FOREIGN KEY (`inventorystatus_id`) REFERENCES `inventorystatus` (`id`);

--
-- Constraints for table `rawmaterialinventorystockout`
--
ALTER TABLE `rawmaterialinventorystockout`
  ADD CONSTRAINT `fk_itminvstockout_itminvstockin_itminvstockin_id` FOREIGN KEY (`inventorystockin_id`) REFERENCES `rawmaterialinventorystockin` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_itmstockout_items_item_id` FOREIGN KEY (`rawmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialinventorystockout_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialinventorystockout_rawmaterials_rawmaterial_id` FOREIGN KEY (`rawmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `rawmaterialpurchaseorderdetails`
--
ALTER TABLE `rawmaterialpurchaseorderdetails`
  ADD CONSTRAINT `fk_rwmtrlprchsordrdtls_rowmaterials_rowmaterial_id` FOREIGN KEY (`rowmaterial_id`) REFERENCES `rawmaterials` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rwmtrlprchsordrdtls_rwmtrlprchordr_rowmtlrprchsordr_id` FOREIGN KEY (`rawmaterialpurchaseorder_id`) REFERENCES `rawmaterialpurchaseorders` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `rawmaterialpurchaseorders`
--
ALTER TABLE `rawmaterialpurchaseorders`
  ADD CONSTRAINT `fk_rawmaterialpurchaseorders_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialpurchaseorders_purchaseorderstatus_status_id` FOREIGN KEY (`status_id`) REFERENCES `purchaseorderstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialpurchaseorders_suppliers_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `rawmaterials`
--
ALTER TABLE `rawmaterials`
  ADD CONSTRAINT `fk_rawmaterials_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterials_categories_category_id` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterials_subcategories_subcategory_id` FOREIGN KEY (`subcategory_id`) REFERENCES `subcategories` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `rawmaterialstocklimits`
--
ALTER TABLE `rawmaterialstocklimits`
  ADD CONSTRAINT `fk_rawmaterialstocklimits_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_rawmaterialstocklimits_rawmaterials_rawmaterial_id` FOREIGN KEY (`rawmaterial_id`) REFERENCES `rawmaterials` (`id`);

--
-- Constraints for table `registrationcommunicationhistory`
--
ALTER TABLE `registrationcommunicationhistory`
  ADD CONSTRAINT `fk_registrationcomhistory_bcpurchaseorders_registration_id` FOREIGN KEY (`registration_id`) REFERENCES `registrations` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_registrationcomhistory_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_registrationcomhistory_communicationtype_communicationtype_id` FOREIGN KEY (`communicationtype_id`) REFERENCES `communicationtype` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `roleroutes`
--
ALTER TABLE `roleroutes`
  ADD CONSTRAINT `fk_roleroutes_areas_area_id` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_roleroutes_modules_module_id` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_roleroutes_roles_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `roles`
--
ALTER TABLE `roles`
  ADD CONSTRAINT `fk_roles_departments_department_id` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `salaries`
--
ALTER TABLE `salaries`
  ADD CONSTRAINT `salaries_employee_id_employees_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `salaryconfigurations`
--
ALTER TABLE `salaryconfigurations`
  ADD CONSTRAINT `fk_salarycomponents_states_state_id` FOREIGN KEY (`state_id`) REFERENCES `states` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_salarycomponents_worksites_worksite_id` FOREIGN KEY (`worksite_id`) REFERENCES `worksites` (`id`),
  ADD CONSTRAINT `fk_salaryconfigurations_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `salesorder`
--
ALTER TABLE `salesorder`
  ADD CONSTRAINT `fk_sales_quotations_quotation_id` FOREIGN KEY (`quotation_id`) REFERENCES `quotations` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_sales_salesorderstatus_salesorderstatus_id` FOREIGN KEY (`salesorderstatus_id`) REFERENCES `salesorderstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_salesorder_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_salesorder_invoicetypes_invoicetype_id` FOREIGN KEY (`invoicetype_id`) REFERENCES `invoicetypes` (`id`);

--
-- Constraints for table `salesorderadditionalcharges`
--
ALTER TABLE `salesorderadditionalcharges`
  ADD CONSTRAINT `fk_saleadditionalcharges_chargetypes_chargetype_id` FOREIGN KEY (`chargetype_id`) REFERENCES `chargetypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_saleadditionalcharges_sale_saesorder_id` FOREIGN KEY (`salesorder_id`) REFERENCES `salesorder` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `salesorderdetails`
--
ALTER TABLE `salesorderdetails`
  ADD CONSTRAINT `fk_salesorderdetails_gstslabs_gstslab_id` FOREIGN KEY (`gstslab_id`) REFERENCES `gstslabs` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `salesorderdetailsbatch`
--
ALTER TABLE `salesorderdetailsbatch`
  ADD CONSTRAINT `fk_salesorderdetailbatch_products_product_id` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_salesroderdetailsbatch_inventorystockin_inventorystockin_id` FOREIGN KEY (`inventorystockin_id`) REFERENCES `productinventorystockin` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_salesroderdetailsbatch_referencetypes_referencetype_id` FOREIGN KEY (`orderreferencetype_id`) REFERENCES `orderreferencetypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `schedulejobconfigurations`
--
ALTER TABLE `schedulejobconfigurations`
  ADD CONSTRAINT `fk_configurations_communicationmodes_communicationmode_id` FOREIGN KEY (`communicationmode_id`) REFERENCES `communicationmodes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_configurations_schedulejobstatus_schedulejobstatus_id` FOREIGN KEY (`schedulejobstatus_id`) REFERENCES `schedulejobstatus` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `servicedelivery`
--
ALTER TABLE `servicedelivery`
  ADD CONSTRAINT `fk_servicedelivery_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `servicedeliverydetails`
--
ALTER TABLE `servicedeliverydetails`
  ADD CONSTRAINT `fk_servicedeliverydetails_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `serviceinvoice`
--
ALTER TABLE `serviceinvoice`
  ADD CONSTRAINT `fk_serviceinvoice_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_serviceinvoice_categories_category_id` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_serviceinvoice_customers_customer_id` FOREIGN KEY (`client_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_serviceinvoice_invoicetypes_invoicetype_id` FOREIGN KEY (`invoicetype_id`) REFERENCES `invoicetypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_serviceinvoice_invpaymentstatus_invoicepaymentstatus_id` FOREIGN KEY (`invoicepaymentstatus_id`) REFERENCES `invoicepaymentstatus` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `serviceinvoicedetails`
--
ALTER TABLE `serviceinvoicedetails`
  ADD CONSTRAINT `fk_serviceinvoicedetails_serviceinvoice_serviceinvoice_id` FOREIGN KEY (`serviceinvoice_id`) REFERENCES `serviceinvoice` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_serviceinvoicedetails_subcategories_subcategory_id` FOREIGN KEY (`subcategory_id`) REFERENCES `subcategories` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `servicememodetails`
--
ALTER TABLE `servicememodetails`
  ADD CONSTRAINT `fk_cashmemodetails_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_cashmemodetails_cashmemos_cashmemo_id` FOREIGN KEY (`servicememo_id`) REFERENCES `servicememos` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `servicememos`
--
ALTER TABLE `servicememos`
  ADD CONSTRAINT `fk_cashmemo_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_cashmemos_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_cashmemos_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `fk_cashmemos_invoicetypes_invoicetype_id` FOREIGN KEY (`invoicetype_id`) REFERENCES `invoicetypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `servicequotation`
--
ALTER TABLE `servicequotation`
  ADD CONSTRAINT `fk_servicequotation_categories_category_id` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_servicequotation_customers_customer_id` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `servicequotationconfigurations`
--
ALTER TABLE `servicequotationconfigurations`
  ADD CONSTRAINT `fk_servicequtnconfig_servicequotation_servicequotation_id` FOREIGN KEY (`servicequotation_id`) REFERENCES `servicequotation` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `servicequotationdetails`
--
ALTER TABLE `servicequotationdetails`
  ADD CONSTRAINT `fk_servicequotationdetails_servicequotation_servicequotation_id` FOREIGN KEY (`servicequotation_id`) REFERENCES `servicequotation` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_servicequotationdetails_servicetypes_servicetype_id` FOREIGN KEY (`servicetype_id`) REFERENCES `servicetypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_servicequotationdetails_subcategories_subcategory_id` FOREIGN KEY (`subcategory_id`) REFERENCES `subcategories` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `shift`
--
ALTER TABLE `shift`
  ADD CONSTRAINT `fk_shift_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_shift_worksites_worksite_id` FOREIGN KEY (`worksite_id`) REFERENCES `worksites` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `states`
--
ALTER TABLE `states`
  ADD CONSTRAINT `fk_states_countries_country_id` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `subcategories`
--
ALTER TABLE `subcategories`
  ADD CONSTRAINT `fk_subcategories_categories_category_id` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `supplieraddresses`
--
ALTER TABLE `supplieraddresses`
  ADD CONSTRAINT `fk_supplieraddresses_addresstypes_addresstype_id` FOREIGN KEY (`addresstype_id`) REFERENCES `addresstypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_supplieraddresses_suppliers_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `suppliercommunicationhistory`
--
ALTER TABLE `suppliercommunicationhistory`
  ADD CONSTRAINT `fk_supcomhistory_supcomtype_supcomype_id` FOREIGN KEY (`suppliercommunicationtype_id`) REFERENCES `suppliercommunicationtype` (`id`),
  ADD CONSTRAINT `fk_suppliercommunicationhistory_suppliers_supplier_id` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`);

--
-- Constraints for table `suppliers`
--
ALTER TABLE `suppliers`
  ADD CONSTRAINT `fk_suppliers_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `systemsettings`
--
ALTER TABLE `systemsettings`
  ADD CONSTRAINT `fk_systemsettings_areas_area_id` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_systemsettings_modules_module_id` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_systemsettings_sections_section_id` FOREIGN KEY (`section_id`) REFERENCES `sections` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `taskassignmenthistory`
--
ALTER TABLE `taskassignmenthistory`
  ADD CONSTRAINT `fk_taskassignmenthistory_task_id_tasks_id` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `tasks`
--
ALTER TABLE `tasks`
  ADD CONSTRAINT `fk_tasks_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`),
  ADD CONSTRAINT `fk_tasks_calendar_calendar_id` FOREIGN KEY (`calendar_id`) REFERENCES `calendar` (`id`),
  ADD CONSTRAINT `fk_tasks_project_id_projects_id` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `templates`
--
ALTER TABLE `templates`
  ADD CONSTRAINT `fk_templates_communicationmodes_coomunicationmode_id` FOREIGN KEY (`communicationmode_id`) REFERENCES `communicationmodes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_templates_templatetypes_templatetype_id` FOREIGN KEY (`templatetype_id`) REFERENCES `templatetypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `templatetypes`
--
ALTER TABLE `templatetypes`
  ADD CONSTRAINT `fk_templatetypes_modules_module_id` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON DELETE NO ACTION;

--
-- Constraints for table `tenderassignmenthistory`
--
ALTER TABLE `tenderassignmenthistory`
  ADD CONSTRAINT `fk_tenderassignmenthistory_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`),
  ADD CONSTRAINT `fk_tenderassignmenthistory_jobtitles_jobtitle_id` FOREIGN KEY (`jobtitle_id`) REFERENCES `jobtitles` (`id`),
  ADD CONSTRAINT `fk_tenderassignmenthistory_tenders_tender_id` FOREIGN KEY (`tender_id`) REFERENCES `tenders` (`id`);

--
-- Constraints for table `tenderdetails`
--
ALTER TABLE `tenderdetails`
  ADD CONSTRAINT `fk_tenderdetails_tenders_tender_id` FOREIGN KEY (`tender_id`) REFERENCES `tenders` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `tenderdocuments`
--
ALTER TABLE `tenderdocuments`
  ADD CONSTRAINT `fK_tenderdocuments_tenders_tender_id` FOREIGN KEY (`tender_id`) REFERENCES `tenders` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `tenders`
--
ALTER TABLE `tenders`
  ADD CONSTRAINT `fk_tenders_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_tenders_customeraddresses_address_id` FOREIGN KEY (`address_id`) REFERENCES `customeraddresses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `timesheet`
--
ALTER TABLE `timesheet`
  ADD CONSTRAINT `fk_timesheet_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`),
  ADD CONSTRAINT `fk_timesheet_shift_shift_id` FOREIGN KEY (`shift_id`) REFERENCES `shift` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_timesheet_timesheetstatus_status_id` FOREIGN KEY (`status_id`) REFERENCES `timesheetstatus` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_timesheet_worksites_worksite_id` FOREIGN KEY (`worksite_id`) REFERENCES `worksites` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `transactions_accounts_accounts_id` FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `travelallowances`
--
ALTER TABLE `travelallowances`
  ADD CONSTRAINT `fK_travelallowances_skilledcategory_skillcategory_id` FOREIGN KEY (`skillcategory_id`) REFERENCES `skilledcategory` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_travelallowances_worksites_worksite_id` FOREIGN KEY (`worksite_id`) REFERENCES `worksites` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `travelexpenses`
--
ALTER TABLE `travelexpenses`
  ADD CONSTRAINT `fk_travelexpenses_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_travelexpenses_employees_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `employees` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_travelexpenses_expensetypes_expensetypes_id` FOREIGN KEY (`expensetypes_id`) REFERENCES `expensestypes` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `userroles`
--
ALTER TABLE `userroles`
  ADD CONSTRAINT `fk_userroles_roles_role_id` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_userroles_users_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `vendoraddresses`
--
ALTER TABLE `vendoraddresses`
  ADD CONSTRAINT `fk_vendoraddresses_addresstypes_addresstype_id` FOREIGN KEY (`addresstype_id`) REFERENCES `addresstypes` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_vendoraddresses_vendors_vendor_id` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `vendorcommunicationhistory`
--
ALTER TABLE `vendorcommunicationhistory`
  ADD CONSTRAINT `fk_vendorcommunicationhistory_vendorcommutype_vendorcommunicatio` FOREIGN KEY (`vendorcommunicationtype_id`) REFERENCES `vendorcommunicationtype` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `vendors`
--
ALTER TABLE `vendors`
  ADD CONSTRAINT `fk_vendors_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `visitplanningdetails`
--
ALTER TABLE `visitplanningdetails`
  ADD CONSTRAINT `fk_visitplanningdetails_visitplannings_visitplanning_id` FOREIGN KEY (`visitplanning_id`) REFERENCES `visitplannings` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `warehouses`
--
ALTER TABLE `warehouses`
  ADD CONSTRAINT `fk_warehouses_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `warranty`
--
ALTER TABLE `warranty`
  ADD CONSTRAINT `fk_warranty_businesses_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_warranty_servicecycle_servicecycle_id` FOREIGN KEY (`servicecycle_id`) REFERENCES `servicecycle` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `warrantyservicedetails`
--
ALTER TABLE `warrantyservicedetails`
  ADD CONSTRAINT `fk_warrantyservicedetails_calendar_calendar_id ` FOREIGN KEY (`calendar_id`) REFERENCES `calendar` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_warrantyservicedetails_servicestatus_servicestatus_id ` FOREIGN KEY (`servicestatus_id`) REFERENCES `servicestatus` (`id`),
  ADD CONSTRAINT `fk_warrantyservicedetails_warranty_warranty_id ` FOREIGN KEY (`warranty_id`) REFERENCES `warranty` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `weekendoff`
--
ALTER TABLE `weekendoff`
  ADD CONSTRAINT `fk_weekendoff_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_weekendoff_days_day_id` FOREIGN KEY (`day_id`) REFERENCES `days` (`id`) ON UPDATE NO ACTION;

--
-- Constraints for table `worksites`
--
ALTER TABLE `worksites`
  ADD CONSTRAINT `fk_worksites_business_business_id` FOREIGN KEY (`business_id`) REFERENCES `businesses` (`id`) ON UPDATE NO ACTION;
COMMIT;

