CREATE TABLE IF NOT EXISTS tbltenant_unit_types (
    id BIGINT(20) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
    tenant_id BIGINT UNSIGNED NOT NULL,
    FOREIGN KEY (tenant_id) REFERENCES tbltenants (id) ON DELETE CASCADE,
    name VARCHAR(191) NOT NULL,
    added_on DATETIME NOT NULL
) ENGINE=INNODB DEFAULT CHARSET=utf8;

ALTER TABLE `tbldetail_estimate_area_task_labour_chareges` ADD `unit` VARCHAR(191) NOT NULL DEFAULT 'hour' AFTER `labour_rate`;

ALTER TABLE `tbldetail_estimate_area_task_labour_chareges` CHANGE `time_estimate` `time_estimate` DECIMAL(15,2) NOT NULL DEFAULT '0.00' COMMENT 'Quantity';

ALTER TABLE `tbldetail_estimate_area_task_labour_chareges` CHANGE `labour_rate` `labour_rate` DECIMAL(15,2) NOT NULL DEFAULT '0.00' COMMENT 'Rate';