ALTER TABLE `tblcontacts` CHANGE `lastname` `lastname` VARCHAR(191) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
ALTER TABLE `tblcontacts` CHANGE `email` `email` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
ALTER TABLE `tblcontacts` CHANGE `phonenumber` `phonenumber` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;

UPDATE tblleads_status_static SET isdefault = 1 WHERE name = 'Not Contacted';
UPDATE tblleads_status SET isdefault = 1 WHERE name = 'Not Contacted';

-- Query to get tenants who have no default Status
SELECT DISTINCT tenant_id FROM `tblleads_status` WHERE isdefault != 1 AND tenant_id NOT IN (SELECT tenant_id FROM tblleads_status WHERE isdefault = 1);