ALTER TABLE `tblinvoices` ADD `property_street` VARCHAR(200) NULL DEFAULT NULL AFTER `subscription_id`, ADD `property_city` VARCHAR(100) NULL DEFAULT NULL AFTER `property_street`, ADD `property_state` VARCHAR(100) NULL DEFAULT NULL AFTER `property_city`, ADD `property_zip` VARCHAR(100) NULL DEFAULT NULL AFTER `property_state`, ADD `property_country` BIGINT(20) UNSIGNED NULL DEFAULT NULL AFTER `property_zip`, ADD `property_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL AFTER `property_country`;

ALTER TABLE `tblestimates`
  DROP `markup`,
  DROP `markup_type`;

ALTER TABLE `tbldetail_estimate_area_tasks` ADD `markup` DOUBLE(15,2) NOT NULL DEFAULT '0.00' AFTER `total`, ADD `markup_type` ENUM('percent','fixed') NOT NULL DEFAULT 'percent' AFTER `markup`;

INSERT INTO `tbloptions` (`tenant_id`, `id`, `name`, `value`, `autoload`) VALUES ('1', NULL, 'default_per_hour_labour_rate', '20', '1'), ('1', NULL, 'default_supply_makrup', '10', '1');
INSERT INTO `tbloptions_static` (`id`, `name`, `value`, `autoload`) VALUES (NULL, 'default_per_hour_labour_rate', '20', '1'), (NULL, 'default_supply_makrup', '10', '1');

ALTER TABLE `tblinvoices` ADD `po_number` VARCHAR(200) NULL DEFAULT NULL AFTER `property_id`;

ALTER TABLE `tbltasks` 
  ADD `clientid` BIGINT(20) UNSIGNED NULL DEFAULT NULL AFTER `deadline_notified`, 
  ADD `property_street` VARCHAR(200) NULL DEFAULT NULL AFTER `clientid`,
  ADD `property_city` VARCHAR(100) NULL DEFAULT NULL AFTER `property_street`,
  ADD `property_state` VARCHAR(100) NULL DEFAULT NULL AFTER `property_city`, 
  ADD `property_zip` VARCHAR(100) NULL DEFAULT NULL AFTER `property_state`, 
  ADD `property_country` BIGINT(20) UNSIGNED NULL DEFAULT NULL AFTER `property_zip`, 
  ADD `property_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL AFTER `property_country`
  ADD `start_time` TIME NULL DEFAULT NULL AFTER `property_country`
  ADD `end_time` TIME NULL DEFAULT NULL AFTER `start_time`;