Date : 22-11-2022 Start
     
ALTER TABLE `tbl_user` 
ADD `business_name` VARCHAR(128) NOT NULL AFTER `full_name`, 
ADD `inspector_name` VARCHAR(128) NOT NULL AFTER `business_name`, 
ADD `business_logo` VARCHAR(256) NOT NULL AFTER `inspector_name`, 
ADD `profile_image` VARCHAR(256) NOT NULL AFTER `business_logo`, 
ADD `inspector_license_number` VARCHAR(64) NOT NULL AFTER `profile_image`, 
ADD `signature` VARCHAR(256) NOT NULL AFTER `inspector_license_number`; 

CREATE TABLE `homspector`.`tbl_inspector` ( `id` BIGINT NOT NULL AUTO_INCREMENT , PRIMARY KEY (`id`) , `user_id` BIGINT NOT NULL , `inspector_name` VARCHAR(64) NOT NULL , `email` VARCHAR(128) NOT NULL , `country_code` VARCHAR(8) NOT NULL , `phone_number` VARCHAR(16) NOT NULL , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ) ENGINE = InnoDB;

ALTER TABLE `tbl_user` CHANGE `business_name` `business_name` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `inspector_name` `inspector_name` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `business_logo` `business_logo` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `profile_image` `profile_image` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `inspector_license_number` `inspector_license_number` VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `signature` `signature` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL; 

ALTER TABLE `tbl_inspector` ADD `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' AFTER `phone_number`; 

Date : 22-11-2022 End

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

Date : 23-11-2022 Start

INSERT INTO `tbl_subscription_plan` (`id`, `plan_name`, `price`, `description`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'free', 'free', 'Create maximum 5 reports.\r\nNo time constraints. Take your time.', 1, '2022-11-23 05:40:01', '2022-11-23 05:40:01'),
(2, 'monthly', '$ 99/month', 'Create unlimited reports.\r\nAdditional inspectors $79/month.', 1, '2022-11-23 05:40:01', '2022-11-23 05:49:26');

ALTER TABLE `tbl_user` ADD `is_subscribe` TINYINT(1) NOT NULL DEFAULT '0' AFTER `password`, ADD `subscription_id` VARCHAR(64) NOT NULL AFTER `is_subscribe`, ADD `user_type` ENUM('U','G') NOT NULL DEFAULT 'U' COMMENT 'U -> user\r\nG -> guest' AFTER `subscription_id`; 

CREATE TABLE `homspector`.`tbl_schedule_inspection` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `inspector_name` VARCHAR(128) NOT NULL , `client_info` LONGTEXT NOT NULL , `inspection_date_time` DATETIME NOT NULL , `inspection_address` VARCHAR(1024) NOT NULL , `realtor_info` LONGTEXT NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

ALTER TABLE `tbl_schedule_inspection` ADD `user_id` BIGINT NOT NULL AFTER `id`; 

ALTER TABLE `tbl_user` ADD `forgot_password_date_time` DATETIME NULL AFTER `password`; 

Date : 23-11-2022 End

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

Date : 24-11-2022 Start

CREATE TABLE `homspector`.`tbl_realtor` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `realtor_name` VARCHAR(128) NOT NULL , `email` VARCHAR(128) NOT NULL , `country_code` VARCHAR(4) NOT NULL , `phone_number` VARCHAR(16) NOT NULL , `is_existing` TINYINT(1) NOT NULL DEFAULT '1' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

CREATE TABLE `homspector`.`tbl_settings` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `enable_flashlight` TINYINT(1) NOT NULL DEFAULT '0' , `enable_camera` TINYINT(1) NOT NULL DEFAULT '0' , `photo_backup_on` ENUM('phone') NOT NULL , `set_save_inspection_time` ENUM('every 5 minutes','every 10 minutes','every 15 minutes','every 20 minutes') NOT NULL , `save_photos_to_gallery` TINYTEXT NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

ALTER TABLE `tbl_settings` CHANGE `photo_backup_on` `photo_backup_on` ENUM('phone') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'phone', CHANGE `set_save_inspection_time` `set_save_inspection_time` ENUM('every 5 minutes','every 10 minutes','every 15 minutes','every 20 minutes') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'every 5 minutes'; 

Date : 24-11-2022 End

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

Date : 25-11-2022 Start

ALTER TABLE `tbl_user` CHANGE `user_type` `user_type` ENUM('I','B','BI') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'U' COMMENT 'I -> Inspector,\r\nB -> Business,\r\nBI -> Business Inspector\r\n'; 

ALTER TABLE `tbl_user` ADD `created_by` VARCHAR(16) NULL DEFAULT NULL AFTER `subscription_id`; 

ALTER TABLE `tbl_user` ADD `business_address` TEXT NULL DEFAULT NULL AFTER `business_email`; 

ALTER TABLE `tbl_user` ADD `latitude` VARCHAR(16) NULL DEFAULT NULL AFTER `business_address`, ADD `longitude` VARCHAR(16) NULL DEFAULT NULL AFTER `latitude`; 

Date : 25-11-2022 End

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

Date : 28-11-2022 Start

ALTER TABLE `tbl_user` ADD `user_role` ENUM('U','G') NOT NULL DEFAULT 'U' COMMENT 'U -> Normal User,\r\nG -> Guest user' AFTER `user_type`; 

ALTER TABLE `tbl_realtor` DROP `is_existing`; 
  
Date : 28-11-2022 End

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

Date : 29-11-2022 Start

ALTER TABLE ` tbl_schedule_inspection` DROP `inspector_name` 
 
ALTER TABLE `tbl_schedule_inspection` ADD `inspector_id` BIGINT NOT NULL AFTER `user_id`; 
  
Date : 29-11-2022 End

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

Date : 30-11-2022 Start


  
Date : 30-11-2022 End

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

Date : 06-12-2022 Start

ALTER TABLE `tbl_settings` CHANGE `set_save_inspection_time` `set_save_inspection_time` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '5 minutes'; 

Date : 06-12-2022 END

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

Date : 07-12-2022 Start

ALTER TABLE `tbl_settings` CHANGE `set_save_inspection_time` `set_save_inspection_time` INT NOT NULL DEFAULT '5'; 

CREATE TABLE `homspector`.`tbl_invoice` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `inspection_fees` LONGTEXT NOT NULL , `multiply_fees` LONGTEXT NOT NULL , `invoice_setting` TEXT NOT NULL , `total` INT NOT NULL , `paid` INT  NULL DEFAULT NULL , `other_payment` INT NOT NULL , `payment_type` ENUM('1','2','3','4','5') NOT NULL COMMENT '1 -> Credit Card ,\r\n2 -> Cheque ,\r\n3 -> Check ,\r\n4 -> Venmo ,\r\n5 -> Other' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 07-12-2022 End

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

Date : 08-12-2022 Start

CREATE TABLE `homspector`.`tbl_contract` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `description` LONGTEXT NOT NULL , `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' , `contract_type` ENUM('S','C','U') NOT NULL DEFAULT 'U' COMMENT 'S -> Standard,\r\nC -> Company,\r\nU -> User' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

CREATE TABLE `homspector`.`tbl_contract_detail` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `library` TEXT NOT NULL , `contract_id` BIGINT NOT NULL , `contract_file` VARCHAR(256) NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 08-12-2022 End

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

Date : 13-12-2022 Start

CREATE TABLE `homspector`.`tbl_library_category` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `name` VARCHAR(128) NOT NULL , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

INSERT INTO `tbl_library_category` (`id`, `name`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, 'Standard', '1', current_timestamp(), current_timestamp()), (NULL, 'Company', '1', current_timestamp(), current_timestamp()), (NULL, 'User', '1', current_timestamp(), current_timestamp()); 

CREATE TABLE `homspector`.`tbl_library` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `category_id` BIGINT NOT NULL , `title` VARCHAR(128) NOT NULL , `description` LONGTEXT NOT NULL , `user_type` ENUM('A','U') NOT NULL COMMENT 'A -> Admin,\r\nU -> User' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB;

CREATE TABLE `tbl_contract` (`id` bigint(20) NOT NULL , `user_id` bigint(20) NOT NULL , `inspection_id` bigint(20) DEFAULT NULL , `library_id` bigint(20) DEFAULT NULL , `user_library` longtext DEFAULT NULL , `contract_file` varchar(256) DEFAULT NULL , `is_deleted` tinyint(1) NOT NULL DEFAULT 0 , `is_active` tinyint(1) NOT NULL DEFAULT 1 , `created_at` timestamp NOT NULL DEFAULT current_timestamp() , `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Date : 13-12-2022 End

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

Date : 14-12-2022 Start 

ALTER TABLE `tbl_library` CHANGE `user_id` `user_id` BIGINT(20) NULL DEFAULT NULL; 

ALTER TABLE `tbl_library` CHANGE `user_type` `user_type` ENUM('A','U') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'U' COMMENT 'A -> Admin,\r\nU -> User'; 

ALTER TABLE `tbl_schedule_inspection` ADD `house_number` VARCHAR(16) NOT NULL AFTER `inspection_address`, ADD `zipcode` VARCHAR(16) NOT NULL AFTER `house_number`, ADD `city` VARCHAR(64) NOT NULL AFTER `zipcode`, ADD `latitude` VARCHAR(32) NOT NULL AFTER `city`, ADD `longitude` VARCHAR(32) NOT NULL AFTER `latitude`; 

ALTER TABLE `tbl_schedule_inspection` ADD `status` ENUM('P','W','S') NOT NULL DEFAULT 'P' COMMENT 'P -> Pending,\r\nW -> Work in Progress,\r\nS -> Saved' AFTER `realtor_info`, ADD `payment_info` ENUM('Paid','UnPaid','Pending') NOT NULL DEFAULT 'UnPaid' AFTER `status`; 

Date : 14-12-2022 End

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

Date : 16-12-2022 Start

CREATE TABLE `homspector`.`tbl_images` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `images` LONGTEXT NOT NULL , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

ALTER TABLE `tbl_user` ADD `is_bank_detail_added` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_subscribe`; 

ALTER TABLE `tbl_bank_detail` ADD `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' AFTER `routing_number`; 

ALTER TABLE `tbl_bank_detail` ADD `bank_id` BIGINT NOT NULL AFTER `user_id`; 

Date : 16-12-2022 End

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

Date : 17-12-2022 Start

CREATE TABLE `homspector`.`tbl_payment_method` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `card_number` BIGINT NOT NULL , `card_holder_name` VARCHAR(128) NOT NULL , `card_expiry` VARCHAR(32) NOT NULL , `cvv` INT NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 17-12-2022 End

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

Date : 19-12-2022 Start

CREATE TABLE `tbl_file_folder_setup` (`id` bigint(20) NOT NULL , `title` varchar(256) NOT NULL , `type` enum('1','2') NOT NULL DEFAULT '1' COMMENT '1 -> File,\r\n2-> Folder' , `is_deleted` tinyint(1) NOT NULL DEFAULT 0 , `is_active` tinyint(1) NOT NULL DEFAULT 1 , `created_at` timestamp NOT NULL DEFAULT current_timestamp() , `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

INSERT INTO `tbl_file_folder_setup` (`id`, `title`, `type`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'YYMMDD_CLIENTLASTNAME_PROPERTYADDRESS', '1', 0, 1, '2022-12-19 11:32:22', '2022-12-19 11:32:22'),
(2, 'YYMMDD_CLIENTLASTNAME', '2', 0, 1, '2022-12-19 11:32:22', '2022-12-19 11:32:22'),
(3, 'YYMMDD_INSPECTORNAME_ADDRESS', '1', 0, 1, '2022-12-19 12:00:14', '2022-12-19 12:00:14'),
(4, 'YYMMDD_INSPECTORNAME', '2', 0, 1, '2022-12-19 12:00:14', '2022-12-19 12:00:14'),
(5, 'DDMMYY_CLIENTLASTNAME_PROPERTYADDRESS', '1', 0, 1, '2022-12-19 12:30:55', '2022-12-19 12:30:55'),
(6, 'DDMMYY_CLIENTLASTNAME', '2', 0, 1, '2022-12-19 12:30:55', '2022-12-19 12:30:55');

ALTER TABLE `tbl_file_folder_setup` ADD PRIMARY KEY (`id`);

ALTER TABLE `tbl_schedule_inspection` ADD `inspection_folder` VARCHAR(256) NOT NULL AFTER `realtor_info`, ADD `inspection_subfolder` LONGTEXT NOT NULL DEFAULT 'Photos, Reports, Invoice and Contracts' AFTER `inspection_folder`; 

ALTER TABLE `tbl_settings` ADD `inspection_folder_name` BIGINT NOT NULL DEFAULT '1' AFTER `save_photos_to_gallery`, ADD `inspection_subfolder_name` BIGINT NOT NULL DEFAULT '2' AFTER `inspection_folder_name`; 

Date : 19-12-2022 End

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

Date : 20-12-2022 Start

CREATE TABLE `homspector`.`tbl_section` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

ALTER TABLE `tbl_section` CHANGE `user_id` `user_id` BIGINT(20) NULL DEFAULT '0' , CHANGE `inspection_id` `inspection_id` BIGINT(20) NULL DEFAULT NULL; 

INSERT INTO `tbl_section` (`id`, `user_id`, `inspection_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, NULL, NULL, 'General', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Exterior', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Structural', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Roof', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Plumbing', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Electrical', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Heating Systems', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Cooling Systems', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Interiors', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Insulation and Ventilation', '0', '1', current_timestamp(), current_timestamp()), (NULL, NULL, NULL, 'Appliances', '0', '1', current_timestamp(), current_timestamp()) 

Date : 20-12-2022 End

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

Date : 21-12-2022 Start

CREATE TABLE `homespector`.`tbl_sub_section` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL DEFAULT '0' , `inspection_id` BIGINT NOT NULL DEFAULT '0' , `section_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

INSERT INTO `tbl_sub_section` (`id`, `user_id`, `inspection_id`, `section_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 0, 0, 1, 'Intro', 0, 1, '2022-12-21 08:21:20', '2022-12-21 08:21:20'),
(2, 0, 0, 1, 'Summary', 0, 1, '2022-12-21 08:21:20', '2022-12-21 08:21:20'),
(3, 0, 0, 1, 'Weather Type', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(4, 0, 0, 1, 'Temperature', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(5, 0, 0, 1, 'Property Status', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(6, 0, 0, 1, 'Limitation', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(7, 0, 0, 2, 'Intro', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(8, 0, 0, 2, 'Siding, Flashing, Trim', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(9, 0, 0, 2, 'Windows, Exterior Doors', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(10, 0, 0, 2, 'Decks, Balconies, Porches & Stoops', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(11, 0, 0, 2, 'Driveway, Patios, Walks, Retaining Walls', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(12, 0, 0, 2, 'Vegetation & Grading', 0, 1, '2022-12-21 08:48:46', '2022-12-21 08:48:46'),
(13, 0, 0, 3, 'Intro', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(14, 0, 0, 3, 'Foundation', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(15, 0, 0, 3, 'Floors', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(16, 0, 0, 3, 'Walls', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(17, 0, 0, 3, 'Ceilings', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(18, 0, 0, 3, 'Roof', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(19, 0, 0, 4, 'Intro', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(20, 0, 0, 4, 'Roof covering materials', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(21, 0, 0, 4, 'Roof drainage system', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(22, 0, 0, 4, 'Flashings, skylights, roof Penetrations', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(23, 0, 0, 4, 'Chimney', 0, 1, '2022-12-21 09:15:39', '2022-12-21 09:15:39'),
(24, 0, 0, 5, 'Intro', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(25, 0, 0, 5, 'Water distribution systems', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(26, 0, 0, 5, 'Drain, waste, vent systems', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(27, 0, 0, 5, 'Water heating equipment', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(28, 0, 0, 6, 'Intro', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(29, 0, 0, 6, 'Main Electrical Service', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(30, 0, 0, 6, 'Distribution Panel', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(31, 0, 0, 6, 'Branch Circuits', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(32, 0, 0, 6, 'Receptacles, Fixtures, Smoke Detectors', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(33, 0, 0, 7, 'Intro', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(34, 0, 0, 7, 'Heating Equipment', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(35, 0, 0, 7, 'Distribution System', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(36, 0, 0, 7, 'Gas Piping and Fuel Storage', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(37, 0, 0, 8, 'Intro', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(38, 0, 0, 8, 'Cooling Equipment', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(39, 0, 0, 8, 'Distribution System', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(40, 0, 0, 9, 'Intro', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(41, 0, 0, 9, 'General Rooms', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(42, 0, 0, 9, 'Kitchen', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(43, 0, 0, 9, 'Bathrooms', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(44, 0, 0, 9, 'Garage', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(45, 0, 0, 9, 'Attics, Basement, Crawl Spaces', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(46, 0, 0, 9, 'Fireplace', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(47, 0, 0, 10, 'Intro', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(48, 0, 0, 10, 'Insulation and Ventilation', 0, 1, '2022-12-21 09:29:18', '2022-12-21 09:29:18'),
(49, 0, 0, 11, 'Intro', 0, 1, '2022-12-21 09:36:35', '2022-12-21 09:36:35'),
(50, 0, 0, 11, 'Appliances', 0, 1, '2022-12-21 09:36:35', '2022-12-21 09:36:35');

ALTER TABLE `tbl_images` ADD `sub_section_id` BIGINT NOT NULL AFTER `inspection_id`; 

Date : 21-12-2022 End

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

Date : 22-12-2022 Start

CREATE TABLE `homespector`.`tbl_intro_library` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL DEFAULT '0' , `inspection_id` BIGINT NOT NULL DEFAULT '0' , `subsection_id` BIGINT NOT NULL , `category_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `introduction` LONGTEXT NOT NULL , `image_video_id` BIGINT NOT NULL DEFAULT '0' , `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' , `user_type` ENUM('A','U') NOT NULL DEFAULT 'U' COMMENT 'A -> Admin,\r\nU -> User' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

ALTER TABLE `tbl_intro_library` CHANGE `image_video_id` `image_video` LONGTEXT NULL DEFAULT NULL; 

ALTER TABLE `tbl_user` CHANGE `profile_image` `profile_image` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'download.jpeg'; 
s
Date : 22-12-2022 End

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

Date : 27-12-2022 Start

ALTER TABLE `tbl_contract` DROP `user_library`;

ALTER TABLE `tbl_library` ADD `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' AFTER `user_type`; 

ALTER TABLE `tbl_section` ADD `section_logo` VARCHAR(256) NOT NULL AFTER `title`; 

UPDATE `tbl_section` SET `section_logo` = 'HIHwixjHDc1672124096.jpeg' WHERE `tbl_section`.`id` = 1
UPDATE `tbl_section` SET `section_logo` = 'f9nyBv9gPI1672124096.jpeg' WHERE `tbl_section`.`id` = 2
UPDATE `tbl_section` SET `section_logo` = 'QJu2Fx3hSf1672124096.jpeg' WHERE `tbl_section`.`id` = 3
UPDATE `tbl_section` SET `section_logo` = 'BKc80hFBop1672124096.jpeg' WHERE `tbl_section`.`id` = 4
UPDATE `tbl_section` SET `section_logo` = 'wDpfvvO8f61672124096.jpeg' WHERE `tbl_section`.`id` = 5
UPDATE `tbl_section` SET `section_logo` = 'emNmEkfmDL1672124096.jpeg' WHERE `tbl_section`.`id` = 6
UPDATE `tbl_section` SET `section_logo` = 'O1PC9UVdqA1672124096.jpeg' WHERE `tbl_section`.`id` = 7
UPDATE `tbl_section` SET `section_logo` = '3GDfmcJ21F1672124096.jpeg' WHERE `tbl_section`.`id` = 8
UPDATE `tbl_section` SET `section_logo` = 'jffCWhgoPh1672124096.jpeg' WHERE `tbl_section`.`id` = 9
UPDATE `tbl_section` SET `section_logo` = 'x4QNXzawDL1672124096.jpeg' WHERE `tbl_section`.`id` = 10
UPDATE `tbl_section` SET `section_logo` = 'aJi0I3vSad1672124096.jpeg' WHERE `tbl_section`.`id` = 11

ALTER TABLE `tbl_section` CHANGE `section_logo` `section_logo` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'HIHwixjHDc1672124096.jpeg'; 

ALTER TABLE `tbl_sub_section` ADD `sub_section_logo` VARCHAR(256) NOT NULL AFTER `title`; 

UPDATE `tbl_section` SET `section_logo` = 'ic_general@3x.png' WHERE `tbl_section`.`id` = 1
UPDATE `tbl_section` SET `section_logo` = 'ic_exterior@3x.png' WHERE `tbl_section`.`id` = 2
UPDATE `tbl_section` SET `section_logo` = 'ic_structural@3x.png' WHERE `tbl_section`.`id` = 3
UPDATE `tbl_section` SET `section_logo` = 'ic_roof@3x.png' WHERE `tbl_section`.`id` = 4
UPDATE `tbl_section` SET `section_logo` = 'ic_plumbing@3x.png' WHERE `tbl_section`.`id` = 5
UPDATE `tbl_section` SET `section_logo` = 'ic_electrical@3x.png' WHERE `tbl_section`.`id` = 6
UPDATE `tbl_section` SET `section_logo` = 'ic_heating@3x.png' WHERE `tbl_section`.`id` = 7
UPDATE `tbl_section` SET `section_logo` = 'ic_cooling@3x.png' WHERE `tbl_section`.`id` = 8
UPDATE `tbl_section` SET `section_logo` = 'ic_interior@3x.png' WHERE `tbl_section`.`id` = 9
UPDATE `tbl_section` SET `section_logo` = 'ic_ventilation@3x.png' WHERE `tbl_section`.`id` = 10
UPDATE `tbl_section` SET `section_logo` = 'ic_appliance@3x.png' WHERE `tbl_section`.`id` = 11

ALTER TABLE `tbl_section` CHANGE `section_logo` `section_logo` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'ic_general@3x.png';  

ALTER TABLE `tbl_intro_library` CHANGE `introduction` `description` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL; 

 Date : 27-12-2022 End 

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

Date : 28-12-2022 Start

CREATE TABLE `homespector`.`tbl_weather` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL DEFAULT '0' , `inspection_id` BIGINT NOT NULL DEFAULT '0' , `subsection_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `description` LONGTEXT NULL DEFAULT NULL , `image_video` VARCHAR(256) NULL DEFAULT NULL , `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' , `user_type` ENUM('U','A') NOT NULL DEFAULT 'U' COMMENT 'U -> User,\r\nA -> Admin' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

INSERT INTO `tbl_weather` (`id`, `user_id`, `inspection_id`, `subsection_id`, `title`, `description`, `image_video`, `save_to_library`, `user_type`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '3', 'sunny', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '3', 'partly cloudy', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '3', 'rain showers', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '3', 'light rain', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '3', 'snowing', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '3', 'smoke', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '3', 'wind', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()) 

Date : 28-12-2022 End

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

Date : 29-12-2022 Start

ALTER TABLE `tbl_sub_section` CHANGE `sub_section_logo` `sub_section_logo` VARCHAR(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'ic_general@3x.png'; 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 7
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_siding@3x-1.png' WHERE `tbl_sub_section`.`id` = 8
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_windows@3x-1.png' WHERE `tbl_sub_section`.`id` = 9
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_decks@3x-1.png' WHERE `tbl_sub_section`.`id` = 10
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_driveway@3x-1.png' WHERE `tbl_sub_section`.`id` = 11
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_vegitation@3x-1.png' WHERE `tbl_sub_section`.`id` = 12 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 13
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_foundation@3x.png' WHERE `tbl_sub_section`.`id` = 14
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_floors@3x.png' WHERE `tbl_sub_section`.`id` = 15
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_walls@3x.png' WHERE `tbl_sub_section`.`id` = 16
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_ceilings@3x.png' WHERE `tbl_sub_section`.`id` = 17
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_roof@3x.png' WHERE `tbl_sub_section`.`id` = 18 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 19
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_roof_cover@3x.png' WHERE `tbl_sub_section`.`id` = 20
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_roof_drainage@3x.png' WHERE `tbl_sub_section`.`id` = 21
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_roof_light@3x.png' WHERE `tbl_sub_section`.`id` = 22
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_chimney@3x.png' WHERE `tbl_sub_section`.`id` = 23 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 24
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_water_system@3x.png' WHERE `tbl_sub_section`.`id` = 25
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_drain_system@3x.png' WHERE `tbl_sub_section`.`id` = 26
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_heating_system@3x.png' WHERE `tbl_sub_section`.`id` = 27 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 28
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_main_service@3x.png' WHERE `tbl_sub_section`.`id` = 29
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_distribution_panel@3x.png' WHERE `tbl_sub_section`.`id` = 30
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_branch_circuits@3x.png' WHERE `tbl_sub_section`.`id` = 31
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_receptacles@3x.png' WHERE `tbl_sub_section`.`id` = 32 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 33
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_heating_equipment@3x.png' WHERE `tbl_sub_section`.`id` = 34
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_distribution_systems@3x.png' WHERE `tbl_sub_section`.`id` = 35
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_gas_piping@3x.png' WHERE `tbl_sub_section`.`id` = 36 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 37
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_cooling@3x.png' WHERE `tbl_sub_section`.`id` = 38
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_fan@3x.png' WHERE `tbl_sub_section`.`id` = 39 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 40
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general_rooms@3x.png' WHERE `tbl_sub_section`.`id` = 41
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_kitchen@3x.png' WHERE `tbl_sub_section`.`id` = 42
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_bathrooms@3x.png' WHERE `tbl_sub_section`.`id` = 43
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_garage@3x.png' WHERE `tbl_sub_section`.`id` = 44
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_attic@3x.png' WHERE `tbl_sub_section`.`id` = 45
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_fireplace@3x.png' WHERE `tbl_sub_section`.`id` = 46 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 47
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_insulation@3x.png' WHERE `tbl_sub_section`.`id` = 48 

UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_general@3x.png' WHERE `tbl_sub_section`.`id` = 49
UPDATE `tbl_sub_section` SET `sub_section_logo` = 'ic_appliances@3x.png' WHERE `tbl_sub_section`.`id` = 50 

INSERT INTO `tbl_weather` (`id`, `user_id`, `inspection_id`, `subsection_id`, `title`, `description`, `image_video`, `save_to_library`, `user_type`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '5', 'vacant', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '5', 'occupied', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '5', 'vacation home', NULL, NULL, '1', 'A', '0', '1', current_timestamp(), current_timestamp()) 

CREATE TABLE `homespector`.`tbl_introduction` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `intro_id` BIGINT NOT NULL , `summary_id` BIGINT NOT NULL , `weather_type` LONGTEXT NOT NULL , `temperature` INT NOT NULL , `start_time` TIME NOT NULL , `end_time` TIME NOT NULL , `property_status` LONGTEXT NOT NULL , `limitation` BIGINT NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 29-12-2022 End

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

Date : 30-12-2022 Start

CREATE TABLE `homespector`.`tbl_location` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL DEFAULT '0' , `inspection_id` BIGINT NOT NULL DEFAULT '0' , `subsection_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `user_type` ENUM('U','A') NOT NULL DEFAULT 'U' COMMENT 'U -> User,\r\nA -> Admin' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

ALTER TABLE `tbl_location` ADD `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' AFTER `title`; 

INSERT INTO `tbl_location` (`id`, `user_id`, `inspection_id`, `subsection_id`, `title`, `save_to_library`, `user_type`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 0, 0, 6, '1st floor', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(2, 0, 0, 6, '2nd floor', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(3, 0, 0, 6, '3rd floor', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(4, 0, 0, 6, '4th floor', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(5, 0, 0, 6, 'front', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(6, 0, 0, 6, 'rear', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(7, 0, 0, 6, 'right', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(8, 0, 0, 6, 'left', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(9, 0, 0, 6, 'bottom', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(10, 0, 0, 6, 'upper', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(11, 0, 0, 6, 'lower', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(12, 0, 0, 6, 'north', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(13, 0, 0, 6, 'east', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(14, 0, 0, 6, 'south', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(15, 0, 0, 6, 'west', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(16, 0, 0, 6, 'wall', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(17, 0, 0, 6, 'driveway', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(18, 0, 0, 6, 'main house', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(19, 0, 0, 6, 'roof', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(20, 0, 0, 6, 'bedroom', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(21, 0, 0, 6, 'kitchen', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(22, 0, 0, 6, 'den', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(23, 0, 0, 6, 'living room', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(24, 0, 0, 6, 'half bath', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(25, 0, 0, 6, 'great room', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(26, 0, 0, 6, 'bathroom', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(27, 0, 0, 6, 'master bedroom', 1, 'A', 0, 1, '2022-12-30 11:19:30', '2022-12-30 11:19:30'),
(28, 0, 0, 6, 'master bath', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23'),
(29, 0, 0, 6, 'dining room', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23'),
(30, 0, 0, 6, 'garage', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23'),
(31, 0, 0, 6, 'loft', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23'),
(32, 0, 0, 6, 'theater', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23'),
(33, 0, 0, 6, 'basement', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23'),
(34, 0, 0, 6, 'crawl space', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23'),
(35, 0, 0, 6, 'utility room', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23'),
(36, 0, 0, 6, 'laundry', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23'),
(37, 0, 0, 6, 'all accessible areas', 1, 'A', 0, 1, '2022-12-30 11:24:23', '2022-12-30 11:24:23');

Date :  30-12-2022

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

Date : 02-01-2023

CREATE TABLE `homespector`.`tbl_limitations` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL DEFAULT '0' , `inspection_id` BIGINT NOT NULL DEFAULT '0' , `subsection_id` BIGINT NOT NULL , `category_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `description` LONGTEXT NOT NULL , `location` LONGTEXT NULL DEFAULT NULL , `image_video` LONGTEXT NULL DEFAULT NULL , `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' , `user_type` ENUM('U','A') NOT NULL DEFAULT 'U' COMMENT 'U -> User,\r\nA -> Admin' ,  `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 02-01-2023

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

Date : 04-01-2023
 
ALTER TABLE `tbl_introduction` CHANGE `intro_id` `intro_id` LONGTEXT NOT NULL, CHANGE `summary_id` `summary_id` LONGTEXT NOT NULL, CHANGE `limitation` `limitation` LONGTEXT NOT NULL;

Preview SQL
CREATE TABLE `homespector`.`tbl_siding_material` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL DEFAULT '0' , `inspection_id` BIGINT NOT NULL DEFAULT '0' , `subsection_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `description` LONGTEXT NULL DEFAULT NULL , `image_video` LONGTEXT NULL DEFAULT NULL , `save_to_library` TINYINT(1) NOT NULL DEFAULT '1' , `user_type` ENUM('U','A') NOT NULL DEFAULT 'U' COMMENT 'U -> User,\r\nA -> Admin' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB;   

INSERT INTO `tbl_siding_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `title`, `save_to_library`, `user_type`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 0, 0, 8, 'Aluminum', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(2, 0, 0, 8, 'PACM', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(3, 0, 0, 8, 'Concrete', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(4, 0, 0, 8, 'Asphalt', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(5, 0, 0, 8, 'Brick', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(6, 0, 0, 8, 'Brick Veneer', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(7, 0, 0, 8, 'Engineered Wood', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(8, 0, 0, 8, 'Stone', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(9, 0, 0, 8, 'Fiber Cement', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(10, 0, 0, 8, 'Cement', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(11, 0, 0, 8, 'Logs', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(12, 0, 0, 8, 'Vinyl', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(13, 0, 0, 8, 'Masonry', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(14, 0, 0, 8, 'Metal', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(15, 0, 0, 8, 'Plastic', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(16, 0, 0, 8, 'Wood Shingles', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(17, 0, 0, 8, 'Wood Shakes', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(18, 0, 0, 8, 'Stucco', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57'),
(19, 0, 0, 8, 'Plywood Vertical', 1, 'A', 0, 1, '2023-01-04 07:53:57', '2023-01-04 07:53:57');

 ALTER TABLE `tbl_siding_material`
  DROP `description`,
  DROP `image_video`; 
  
ALTER TABLE `tbl_introduction` CHANGE `limitation` `limitation` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL;   

CREATE TABLE `homespector`.`tbl_siding_flashing_trim_detail` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL DEFAULT '0' , `inspection_id` BIGINT NOT NULL DEFAULT '0' , `subsection_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `description` LONGTEXT NULL DEFAULT NULL , `location` LONGTEXT NULL DEFAULT NULL , `image_video` LONGTEXT NULL DEFAULT NULL , `flag` TINYINT(1) NOT NULL DEFAULT '0' , `save_to_library` TINYINT(1) NOT NULL DEFAULT '1' , `user_type` ENUM('U','A') NOT NULL DEFAULT 'U' COMMENT 'U -> User,\r\nA -> Admin' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

INSERT INTO `tbl_siding_flashing_trim_detail` (`id`, `user_id`, `inspection_id`, `subsection_id`, `title`, `description`, `location`, `image_video`, `flag`, `save_to_library`, `user_type`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '8', 'Siding Materials', NULL, NULL, NULL, '1', '1', 'A', '0', '1', current_timestamp(), current_timestamp()) 

Date : 04-01-2023 

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

Date : 05-01-2023

CREATE TABLE `homespector`.`tbl_comment` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL DEFAULT '0' , `inspection_id` BIGINT NOT NULL DEFAULT '0' , `subsection_id` BIGINT NOT NULL , `library_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `comment` LONGTEXT NOT NULL , `location` LONGTEXT NULL DEFAULT NULL , `image_video` LONGTEXT NULL DEFAULT NULL , `comment_category_id` BIGINT NULL DEFAULT NULL , `save_to_library` TINYINT(1) NOT NULL DEFAULT '1' , `user_type` ENUM('U','A') NOT NULL DEFAULT 'U' COMMENT 'U -> User,\r\nA -> Admin' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

CREATE TABLE `homespector`.`tbl_comment_category` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `name` VARCHAR(256) NOT NULL , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

INSERT INTO `tbl_comment_category` (`id`, `name`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, 'General Info', '1', current_timestamp(), current_timestamp()), (NULL, 'Maintenance', '1', current_timestamp(), current_timestamp()), (NULL, 'Deficiency', '1', current_timestamp(), current_timestamp()) 

ALTER TABLE `tbl_comment` ADD `flag` TINYINT(1) NOT NULL DEFAULT '0' AFTER `comment_category_id`; 

ALTER TABLE `tbl_intro_library` ADD `section_id` BIGINT NOT NULL AFTER `inspection_id`; 

ALTER TABLE `tbl_limitations` ADD `section_id` BIGINT NOT NULL AFTER `inspection_id`; 

Date : 05-01-2023

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

Date : 06-01-2023

ALTER TABLE `tbl_siding_material` ADD `detail_id` BIGINT NOT NULL DEFAULT '0' AFTER `subsection_id`; 

CREATE TABLE `homespector`.`tbl_siding_flashing_trim` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `subsection_id` LONGTEXT NOT NULL , `detail_id` LONGTEXT NULL DEFAULT NULL , `material_id` LONGTEXT NULL DEFAULT NULL , `comment_id` LONGTEXT NULL DEFAULT NULL , `limitation_id` LONGTEXT NULL DEFAULT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 06-01-2023

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

Date : 09-01-2023 Start

ALTER TABLE `tbl_section` ADD `is_default` TINYINT(1) NOT NULL DEFAULT '0' AFTER `section_logo`;

UPDATE `tbl_section` SET `is_default` = '1' WHERE user_id = 0;

ALTER TABLE `tbl_sub_section` ADD `is_default` TINYINT(1) NOT NULL DEFAULT '0' AFTER `sub_section_logo`; 

UPDATE `tbl_sub_section` SET `is_default`= 1 WHERE user_id = 0 AND inspection_id = 0;

ALTER TABLE `tbl_location` ADD `is_default` TINYINT(1) NOT NULL DEFAULT '0' AFTER `user_type`; 

UPDATE `tbl_location` SET `is_default`= 1 WHERE user_id = 0 AND inspection_id = 0;

ALTER TABLE `tbl_siding_flashing_trim_detail` ADD `is_default` TINYINT(1) NOT NULL DEFAULT '0' AFTER `user_type`; 

UPDATE `tbl_siding_flashing_trim_detail` SET `is_default` = '1' WHERE `tbl_siding_flashing_trim_detail`.`id` = 1;

ALTER TABLE `tbl_siding_material` ADD `is_default` TINYINT(1) NOT NULL DEFAULT '0' AFTER `user_type`;  

UPDATE `tbl_siding_material` SET `is_default`= 1 WHERE user_id = 0 AND inspection_id = 0;

ALTER TABLE `tbl_weather` ADD `is_default` TINYINT(1) NOT NULL DEFAULT '0' AFTER `user_type`; 

UPDATE `tbl_weather` SET `is_default`= 1 WHERE user_id = 0 AND inspection_id = 0;

CREATE TABLE `homespector`.`tbl_intro_limitation` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `subsection_id` BIGINT NOT NULL , `intro_id` LONGTEXT NULL DEFAULT NULL , `limitation_id` LONGTEXT NULL DEFAULT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 09-01-2023 End

---------------------------------------------------------------------------------------------------------------------------------------------
 
Date : 10-01-2023 Start

ALTER TABLE `tbl_schedule_inspection` ADD `property_image` VARCHAR(256) NULL DEFAULT NULL AFTER `realtor_info`; 

INSERT INTO `tbl_siding_flashing_trim_detail` (`id`, `user_id`, `inspection_id`, `subsection_id`, `title`, `description`, `location`, `image_video`, `flag`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '9', 'Windows Types', NULL, NULL, NULL, '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', 'Door Types', NULL, NULL, NULL, '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()),(NULL, '0', '0', '10', 'Features', NULL, NULL, NULL, '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', 'Materials', NULL, NULL, NULL, '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '11', 'Driveway type', NULL, NULL, NULL, '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '12', 'Vegetation/Grading', NULL, NULL, NULL, '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_siding_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `detail_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '9', '5', 'Double hung', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '5', 'Fixed', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '5', 'Casement', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '5', 'Glass block', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '5', 'Vinyl block', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '5', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '5', 'Aluminum clad', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '5', 'Vinyl clad', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '5', 'Jalousies', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '6', 'Fiberglass', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '6', 'Glass', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '6', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '9', '6', 'Aluminium', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_siding_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `detail_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '10', '7', 'Decks', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '7', 'Balconies', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '7', 'Patio', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '7', 'Gazebo', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '7', 'Pool', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '7', 'Porches', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '8', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '8', 'Concrete', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '8', 'Engineered Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '8', 'Composite Surface', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '8', 'Wood Surface', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '8', 'Tile surface', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '10', '8', 'Membrane surface', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())  

INSERT INTO `tbl_siding_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `detail_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '11', '9', 'Concrete', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '11', '9', 'Stone pavers', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '11', '9', 'Gravel', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '11', '9', 'Asphalt', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '11', '9', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '12', '10', 'Trees', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '12', '10', 'Vegetation', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '12', '10', 'Grading', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

Date : 10-01-2023 End

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

Date : 12-01-2023 Start

ALTER TABLE `tbl_intro_limitation` ADD `method_id` LONGTEXT NULL DEFAULT NULL AFTER `intro_id`;

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '2', '8', 'Siding Materials', '0', '1', current_timestamp(), current_timestamp()), (NULL, '2', '9', 'Windows Types', '0', '1', current_timestamp(), current_timestamp()), (NULL, '2', '9', 'Door Types', '0', '1', current_timestamp(), current_timestamp()), (NULL, '2', '10', 'Features', '0', '1', current_timestamp(), current_timestamp()), (NULL, '2', '10', 'Materials', '0', '1', current_timestamp(), current_timestamp()), (NULL, '2', '11', 'Driveway type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '2', '12', 'Vegetation/Grading', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 2, 8, 'Siding Materials', 0, 1, '2023-01-12 07:49:22', '2023-01-12 07:49:22'),
(2, 2, 9, 'Windows Types', 0, 1, '2023-01-12 07:49:22', '2023-01-12 07:49:22'),
(3, 2, 9, 'Door Types', 0, 1, '2023-01-12 07:49:22', '2023-01-12 07:49:22'),
(4, 2, 10, 'Features', 0, 1, '2023-01-12 07:49:22', '2023-01-12 07:49:22'),
(5, 2, 10, 'Materials', 0, 1, '2023-01-12 07:49:22', '2023-01-12 07:49:22'),
(6, 2, 11, 'Driveway type', 0, 1, '2023-01-12 07:49:22', '2023-01-12 07:49:22'),
(7, 2, 12, 'Vegetation/Grading', 0, 1, '2023-01-12 07:49:22', '2023-01-12 07:49:22');

ALTER TABLE `tbl_material` CHANGE `detail_id` `inner_subsection_id` BIGINT(20) NOT NULL; 

UPDATE `tbl_material` SET `inner_subsection_id`= 1 WHERE subsection_id = 8;

ALTER TABLE `tbl_user_section_details` CHANGE `detail_id` `inner_subsection_id` BIGINT NOT NULL; 

ALTER TABLE `tbl_user_section_details` ADD `custom_title` VARCHAR(256) NULL DEFAULT NULL AFTER `limitation_id`, ADD `description` LONGTEXT NULL DEFAULT NULL AFTER `custom_title`, ADD `location` LONGTEXT NULL DEFAULT NULL AFTER `description`, ADD `image_video` LONGTEXT NULL DEFAULT NULL AFTER `location`, ADD `flag` TINYINT(1) NOT NULL DEFAULT '0' AFTER `image_video`; 

ALTER TABLE `tbl_user_section_details` ADD `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' AFTER `flag`; 

ALTER TABLE `tbl_user_section_details` ADD `section_id` BIGINT NOT NULL AFTER `inspection_id`;  

Date : 12-01-2023 End

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

Date : 16-01-2023 Start

CREATE TABLE `homespector`.`tbl_inspection_method` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NULL DEFAULT NULL , `inspection_id` BIGINT NULL DEFAULT NULL , `section_id` BIGINT NOT NULL , `subsection_id` BIGINT NOT NULL , `category_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `description` LONGTEXT NULL DEFAULT NULL , `image_video` LONGTEXT NULL DEFAULT NULL , `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' , `user_type` ENUM('U','A') NOT NULL DEFAULT 'U' COMMENT 'U -> User,\r\nA -> Admin' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB;

ALTER TABLE `tbl_inspection_method` ADD `location_id` LONGTEXT NULL DEFAULT NULL AFTER `image_video`; 

Date : 16-01-2023 End

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

Date : 17-01-2023 Start 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '3', '14', 'Foundation Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '3', '14', 'Foundation Materials', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '3', '15', 'Floor Joist Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '3', '15', 'Floor Beam Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '3', '15', 'Sub-Floor Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '3', '16', 'Wall Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '3', '17', 'Ceilings Joist Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '3', '18', 'Roof Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '3', '18', 'Roof Beam Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '3', '18', 'Roof Sheathing Type', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '14', '8', 'Basement', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '8', 'Crawl Space', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '8', 'Pilings', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '8', 'Slab', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '9', 'Brick', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '9', 'Block', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '9', 'Concrete', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '9', 'Stucco Finish', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '9', 'Steel', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '9', 'Stone', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '9', 'Undetermined', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '14', '9', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '10', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '10', 'Dimensional Lumber', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '10', 'Engineered Truss', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '10', 'Engineered Joist', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '10', 'Not Visible', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '11', 'Dimensional Lumber', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '11', 'Engineered', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '11', 'Joist', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '11', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '11', 'Steel', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '11', 'Log', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '11', 'Timber Construction', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '11', 'Not Visible', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '15', '12', 'Concrete Slab ', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '12', 'Dimensional Lumbar', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '12', 'OSB', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '12', 'Plywood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '15', '12', 'Not Visible', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '16', '13', 'Standard Construction ', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '16', '13', 'Dimensional Lumber', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '16', '13', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '16', '13', 'Metal', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '16', '13', 'Engineered System', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '16', '13', 'Truss', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '16', '13', 'Not Visible', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '17', '14', 'Engineered System', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '17', '14', 'Dimensional Lumber', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '17', '14', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '17', '14', 'Metal', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '17', '14', 'I-Joist', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '17', '14', 'Truss', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '17', '14', 'Not Visible', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '18', '15', 'Gable', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '15', 'Flat', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '15', 'Hip', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '15', 'Gambrel', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '15', 'Shed', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '15', 'Mansard', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '16', 'Engineered System', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '16', 'Dimensional Lumber', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '16', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '16', 'Truss', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '16', 'I-beam', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '17', 'Dimensional Lumber', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '17', 'OSB', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '17', 'Plywood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '18', '17', 'Not Visible', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '4', '20', 'Roof Covering Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '4', '21', 'Component Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '4', '22', 'System or Component ', '0', '1', current_timestamp(), current_timestamp()), (NULL, '4', '23', 'Chimney Type', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '20', '18', 'Built up Roof', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Tar', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Gravel', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Clay Tiles', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Fiber Cement Tiles', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Concrete Tiles', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Metal Panel Standing Seam', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Metal Panel Surface fasteners', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Shingles', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Shakes', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Metal', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Wood', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Roll Asphalt', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Rubber Membrane', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'EPDM', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'TPO', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Asphalt Fiberglass Shingles', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Slate', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Copper', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '20', '18', 'Wood Shingles', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '21', '19', 'Gutter', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '21', '19', 'Downspout', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '21', '19', 'Tray and Chain System ', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '22', '20', 'Attic Fan', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Exhaust Fan Exit', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Cupola', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Chimney Flashing', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Roof Rake Flashing', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Flue', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Furnace Flue', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Water Heater Flue', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Lightning Rods', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Plumbing Vent', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Skylight', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '22', '20', 'Weathervane', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '23', '21', 'Metal', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '23', '21', 'Pre-Manufactured', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '23', '21', 'Masonry', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '23', '21', 'Sided', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '23', '21', 'Water Heater Flue', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

Date : 17-01-2023 End

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

Date : 18-01-2023 Start 

ALTER TABLE `tbl_user_section_details` ADD `material_section_no` BIGINT NOT NULL DEFAULT '1' AFTER `image_video`; 

Date : 18-10-2023 End

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

Date : 19-01-2023 Start

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '5', '24', 'Main Water Shutoff Location', '0', '1', current_timestamp(), current_timestamp()), (NULL, '5', '24', 'Water Supply Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '5', '24', 'Main Water Supply Line Materials', '0', '1', current_timestamp(), current_timestamp()), (NULL, '5', '25', 'Distribution Line Materials ', '0', '1', current_timestamp(), current_timestamp()), (NULL, '5', '26', 'Drain, Waste, Vent Materials', '0', '1', current_timestamp(), current_timestamp()), (NULL, '5', '27', 'Water Heater 1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '5', '27', 'Fuel Source ', '0', '1', current_timestamp(), current_timestamp()), (NULL, '5', '27', 'Capacity', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '24', '22', 'Basement', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '22', 'Closet', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '22', 'Crawl Space', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '22', 'Garage', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '22', 'Laundry', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '22', 'Not Located', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '22', 'Utility Room', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '22', 'Water Meter', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '22', 'Well Pump', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '24', '23', 'Community Well', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '23', 'Private Well', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '23', 'Public/Municipal', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '23', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '24', 'Not Visible', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '24', 'CPVC', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '24', 'Copper/Brass', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '24', 'Galvanized', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '24', 'PEX', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '24', 'Polybutylene', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '24', 'PVC', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '24', '24', 'Polyethylene', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '25', '25', 'Not Visible', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '25', '25', 'Copper/Brass', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '25', '25', 'PEX', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '25', '25', 'PVC', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '25', '25', 'CPVC', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '25', '25', 'Polybutylene', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '25', '25', 'Galvanized', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '26', '26', 'Not Visible', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '26', '26', 'PVC', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '26', '26', 'ABS', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '26', '26', 'Copper/Brass', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '26', '26', 'Galvanized', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '26', '26', 'Cast Iron', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '27', '27', 'AO Smith', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '27', 'GE', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '27', 'Ruud', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '27', 'Rheem', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '27', 'State', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '27', 'American', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '27', 'Rinnai', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '27', 'Navien', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '27', '28', 'Gas', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '28', 'Natural Gas', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '28', 'Propane', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '28', 'Electric', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '28', 'Oil', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '28', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '27', '29', '10', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '15', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '20', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '25', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '30', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '35', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '38', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '40', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '47', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '48', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '50', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '80', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', '100', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '27', '29', 'Tankless', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())  

CREATE TABLE `homespector`.`tbl_water_heating_equipment` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `section_id` BIGINT NOT NULL , `subsection_id` BIGINT NOT NULL , `inner_subsection_id` BIGINT NOT NULL , `material_id` LONGTEXT NULL DEFAULT NULL , `serial_number` VARCHAR(128) NULL DEFAULT NULL , `manufacture_date` VARCHAR(64) NULL DEFAULT NULL , `comment_id` LONGTEXT NULL DEFAULT NULL , `limitation_id` LONGTEXT NULL DEFAULT NULL , `custom_title` VARCHAR(256) NULL DEFAULT NULL , `description` LONGTEXT NULL DEFAULT NULL , `image_video` LONGTEXT NULL DEFAULT NULL , `location` LONGTEXT NULL DEFAULT NULL , `material_section_no` BIGINT NOT NULL DEFAULT '1' , `flag` TINYINT(1) NOT NULL DEFAULT '0' , `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB;


Date : 19-01-2023 End

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

Date : 20-01-2023 Start

ALTER TABLE `tbl_comment` CHANGE `comment_category_id` `comment_category_id` BIGINT(20) NOT NULL DEFAULT '1'; 

Date : 20-01-2023 End

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

Date : 23-01-2023 Start

ALTER TABLE `tbl_introduction` CHANGE `intro_id` `intro_id` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `summary_id` `summary_id` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `weather_type` `weather_type` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `temperature` `temperature` INT(11) NULL DEFAULT NULL, CHANGE `start_time` `start_time` TIME NULL DEFAULT NULL, CHANGE `end_time` `end_time` TIME NULL DEFAULT NULL, CHANGE `property_status` `property_status` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL;

CREATE TABLE `homespector`.`tbl_plumbing_intro` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `section_id` BIGINT NOT NULL , `subsection_id` BIGINT NOT NULL , `intro_id` LONGTEXT NULL DEFAULT NULL , `inner_subsection_id` BIGINT NOT NULL , `material_id` LONGTEXT NULL DEFAULT NULL , `limitation_id` LONGTEXT NULL DEFAULT NULL , `material_section_no` BIGINT NOT NULL , `custom_title` VARCHAR(256) NULL DEFAULT NULL , `description` LONGTEXT NULL DEFAULT NULL , `location` LONGTEXT NULL DEFAULT NULL , `image_video` LONGTEXT NULL DEFAULT NULL , `flag` TINYINT(1) NOT NULL DEFAULT '0' , `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 23-01-2023 End

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

Date : 25-01-2023 Start

CREATE TABLE `homespector`.`tbl_limitation_comment_into` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `section_id` BIGINT NOT NULL , `subsection_id` BIGINT NOT NULL , `used_section_id` BIGINT NULL DEFAULT NULL , `used_subsection_id` BIGINT NULL DEFAULT NULL , `title` VARCHAR(256) NOT NULL , `description` LONGTEXT NOT NULL , `location` LONGTEXT NULL DEFAULT NULL , `image_video` LONGTEXT NULL DEFAULT NULL , `type` VARCHAR(256) NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

ALTER TABLE `tbl_limitation_comment_into` ADD `flag` TINYINT(1) NOT NULL DEFAULT '0' AFTER `image_video`, ADD `comment_category_id` TINYINT(1) NOT NULL DEFAULT '1' AFTER `flag`; 

Date : 25-01-2023 End

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

Date : 26-01-2023 Start 

ALTER TABLE `tbl_limitation_comment_into` ADD `original_id` BIGINT NOT NULL AFTER `used_subsection_id`; 

CREATE TABLE `homespector`.`tbl_flag_count` ( `id` INT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `section_id` BIGINT NOT NULL , `subsection_id` BIGINT NOT NULL , `total_flag` BIGINT NULL DEFAULT NULL , `is_save` TINYINT(1) NOT NULL DEFAULT '0' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

ALTER TABLE `tbl_flag_count` CHANGE `total_flag` `total_flag` BIGINT(20) NOT NULL DEFAULT '0'; 

Date : 26-01-2023 End

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

Date : 27-01-2023 Start

ALTER TABLE `tbl_limitation_comment_into` ADD `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' AFTER `type`;  

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '6', '28', 'Detectors', '0', '1', current_timestamp(), current_timestamp()), (NULL, '6', '29', 'Main Service Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '6', '29', 'Grounding Electrode', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '28', '34', 'Smoke Detector Present', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '28', '34', 'Carbon Monoxide Detector Present', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '29', '35', 'Overhead', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '29', '35', 'Underground', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '29', '35', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '29', '36', 'Driven Rod', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '29', '36', 'Water Pipe', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '29', '36', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

Date : 27-01-2023 End

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

Date : 30-01-2023 Start 

ALTER TABLE `tbl_inner_sub_section` ADD `parent_id` BIGINT NOT NULL DEFAULT '0' AFTER `subsection_id`; 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '6', '30', '0', 'Main Panel 1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '6', '30', '37', 'Service Cable Material', '0', '1', current_timestamp(), current_timestamp()), (NULL, '6', '30', '37', 'Amperage', '0', '1', current_timestamp(), current_timestamp()), (NULL, '6', '30', '37', 'Voltage', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '30', '38', 'Aluminum', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '38', 'Copper', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '38', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '39', '30', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '39', '40', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '39', '60', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '39', '90', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '39', '100', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '39', '125', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '39', '150', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '39', '200', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '30', '39', '225', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '39', '250', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '40', '120 Volts 1 Phase', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '40', '120/240 Volts 1 Phase', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '40', '230 Volts 3 Phase', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '40', '230/460 Volts 3 Phase', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '40', '240 Volts 1 Phase', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '30', '40', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '6', '31', '0', 'Distribution Panel 1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '6', '31', '41', 'Service Cable Material', '0', '1', current_timestamp(), current_timestamp()), (NULL, '6', '31', '41', 'Amperage', '0', '1', current_timestamp(), current_timestamp()), (NULL, '6', '31', '41', 'Voltage', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '31', '42', 'Aluminum\r\n\r\n', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '42', 'Copper', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '42', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '31', '43', '30', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '43', '40', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '43', '60', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '43', '90', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '43', '100', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '43', '125', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '43', '150', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '43', '200', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '43', '225', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '43', '250', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '31', '44', '120 Volts 1 Phase\r\n', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '44', '120/240 Volts 1 Phase', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '44', '230 Volts 3 Phase', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '44', '230/460 Volts 3 Phase', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '44', '240 Volts 1 Phase', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '31', '44', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '6', '32', '0', 'Branch Circuits', '0', '1', current_timestamp(), current_timestamp()), (NULL, '6', '32', '45', 'Material', '0', '1', current_timestamp(), current_timestamp()), (NULL, '6', '32', '45', 'Wiring Method', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '32', '46', 'Aluminum', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '32', '46', 'Copper', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '32', '47', 'Conduit', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '32', '47', 'Knob & Tube', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '32', '47', 'Romex', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '32', '47', 'Not Visible', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '32', '47', 'Surface Mounted', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '6', '33', '0', 'Fixtures, Receptacles, Switches, Smoke/CO Detectors ', '0', '1', current_timestamp(), current_timestamp()) 

Date : 30-01-2023 End

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

Date : 31-01-2023 Start

ALTER TABLE `tbl_water_heating_equipment` ADD `model_number` VARCHAR(64) NULL DEFAULT NULL AFTER `serial_number`; 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '7', '35', '0', 'Heating Unit 1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '7', '35', '49', 'Manufacturer', '0', '1', current_timestamp(), current_timestamp()), (NULL, '7', '35', '0', 'Heating Unit Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '7', '35', '0', 'Energy Source', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '7', '36', '0', 'Services Heating Unit', '0', '1', current_timestamp(), current_timestamp()), (NULL, '7', '36', '0', 'Access Area', '0', '1', current_timestamp(), current_timestamp()), (NULL, '7', '36', '0', 'Distribution Type', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '7', '37', '0', 'Gas Piping Material', '0', '1', current_timestamp(), current_timestamp()), (NULL, '7', '37', '0', 'Fuel Shut-off Location', '0', '1', current_timestamp(), current_timestamp()), (NULL, '7', '37', '0', 'Fuel Tank Present', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '35', '50', 'Trane', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '50', 'Goodman', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '50', 'US Alumacoil', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '50', 'American Standard', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '50', 'York', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '50', 'Nordyne', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '50', 'Daikin', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '50', 'Unknown', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '35', '51', 'Boiler', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Electric Baseboard', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Electric Furnace', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Wall Heater', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Furnace (gas)', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Furnace (package unit)', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Ductless Wall Unit (gas)', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Heat Pump', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Geothermal', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Hybrid Package Unit', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Hybrid Split', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Package Unit ', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Split System', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Ductless (through wall)', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Radiant Floor Heat ', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Wood Furnace ', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Wood Stove', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '51', 'Wood Stove Insert', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '35', '52', 'Gas', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '52', 'Electricity', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '52', 'Natural Gas', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '52', 'Propane', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '52', 'Oil', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '35', '52', 'Wood', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '36', '53', '1st Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '36', '53', '3rd Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '36', '53', '2nd Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '36', '53', '4th Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '36', '55', 'Forced Air', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '36', '55', 'Flexible Branch', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '36', '55', 'Metal Branch', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '36', '55', 'Radiant Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '36', '55', 'Radiant Ceiling', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '36', '55', 'Radiator', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '37', '56', 'Black Steel', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '37', '56', 'Copper', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '37', '56', 'At Furnace', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '37', '56', 'Galvanized Steel', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '37', '56', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '37', '57', 'At Tank', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '37', '57', 'At Meter', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '37', '57', 'At Furnace', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '37', '58', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '37', '58', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())


Date : 31-01-2023 End

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

Date : 01-02-2023 Start

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '8', '39', '0', 'Cooling Unit 1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '8', '39', '59', 'Manufacturer', '0', '1', current_timestamp(), current_timestamp()), (NULL, '8', '39', '0', 'Cooling Unit Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '8', '39', '0', 'Energy Source', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '8', '40', '0', 'Services Cooling Unit', '0', '1', current_timestamp(), current_timestamp()), (NULL, '8', '40', '0', 'Access Area', '0', '1', current_timestamp(), current_timestamp()), (NULL, '8', '40', '0', 'Distribution Type', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '39', '60', 'Trane', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '60', 'Goodman', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '60', 'US Alumacoil', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '60', 'American Standard', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '60', 'York', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '60', 'Nordyne', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '60', 'Daikin', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '60', 'Unknown', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '39', '61', 'Package Unit', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '61', 'Split System', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '61', 'Ductless Through Wall', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '61', 'Geothermal', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '61', 'Hybrid Package ', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '61', 'Hybrid Split', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '39', '61', 'Heat Pump', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '39', '62', 'Electric', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '40', '63', '1st Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '40', '63', '3rd Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '40', '63', '2nd Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '40', '63', '4th Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '40', '65', 'Forced Air', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '40', '65', 'Flexible Branch', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '40', '65', 'Metal Branch', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '40', '65', 'Radiant Floor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '40', '65', 'Radiant Ceiling', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '40', '65', 'Radiator', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

CREATE TABLE `homespector`.`tbl_email_text` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL DEFAULT '0' , `inspection_id` BIGINT NOT NULL DEFAULT '0' , `category_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `description` LONGTEXT NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

ALTER TABLE `tbl_email_text` ADD `user_type` ENUM('U','A') NOT NULL DEFAULT 'A' COMMENT 'U -> User,\r\nA -> Admin' AFTER `description`; 

ALTER TABLE `tbl_email_text` ADD `text_type` ENUM('IA','R','C') NULL DEFAULT NULL COMMENT 'IA -> Invoice & Agreement,\r\nR -> Report,\r\nC -> Custom' AFTER `description`; 

ALTER TABLE `tbl_email_text` CHANGE `category_id` `category_id` BIGINT(20) NULL DEFAULT NULL; 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '9', '42', '0', 'General Rooms', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '9', '42', '66', 'Furniture/Storage Present', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '42', '66', 'Finished Area', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '42', '66', 'Heating Source Present', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '42', '66', 'Cooling Source Present', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '9', '43', '0', 'kitchen', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '43', '71', 'Furniture/Storage Present', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '43', '71', 'Finished Area', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '43', '71', 'Heating Source Present', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '43', '71', 'Cooling Source Present', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '9', '44', '0', 'Bathrooms', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '44', '76', 'Ventilation Fan Present', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '44', '76', 'Window for Ventilation Present', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '44', '76', 'Receptacle Present', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '9', '45', '0', 'Garage', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '9', '46', '0', 'Area', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '46', '81', 'Furniture/Storage Present', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '46', '81', 'Unfinished Area', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '9', '47', '0', 'Fireplace/Stove Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '47', '84', 'Exhaust Flue Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '9', '47', '84', 'Energy Source', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '42', '67', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '42', '67', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '42', '68', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '42', '68', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '42', '69', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '42', '69', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '42', '70', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '42', '70', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '43', '72', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '43', '72', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '43', '73', 'Yes', '1', '1', 'A', '4', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '43', '73', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '43', '74', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '43', '74', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '43', '75', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '43', '75', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '44', '77', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '44', '77', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '44', '78', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '44', '78', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '44', '79', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '44', '79', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '46', '82', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '46', '82', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '46', '83', 'Yes', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '46', '83', 'No', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '47', '84', 'Masonry', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '84', 'Pre-Manufactured', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '84', 'Metal', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '84', 'Free Standing', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '84', 'Stove', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '47', '85', 'Masonry', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '85', 'Clay', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '85', 'Tile Liner', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '85', 'Unlined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '85', 'Metal', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '85', 'Pre-Fabricated', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '85', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '86', 'Coal', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '86', 'Electricity', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '86', 'Gas', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '86', 'Natural Gas', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '86', 'Propane', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '86', 'Wood', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '47', '86', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())


Date : 01-02-2023 End

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

Date : 02-02-2023 Start

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '10', '49', '0', 'Area Name', '0', '1', current_timestamp(), current_timestamp()), (NULL, '10', '49', '0', 'Insulation Type', '0', '1', current_timestamp(), current_timestamp()), (NULL, '10', '49', '0', 'Ventilation Type', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_inner_sub_section` (`id`, `section_id`, `subsection_id`, `parent_id`, `title`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '11', '51', '0', 'Appliance', '0', '1', current_timestamp(), current_timestamp()) 

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '49', '88', 'Batt', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '49', '88', 'Fiberglass', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '49', '88', 'Cellulose', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '49', '88', 'Spray Foam', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '49', '88', 'Kraft-faced', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '49', '88', 'None', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '49', '88', 'Mineral Wool', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '49', '88', 'Not Visible', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '49', '88', 'Vermiculite', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '49', '88', 'Undetermined', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

INSERT INTO `tbl_material` (`id`, `user_id`, `inspection_id`, `subsection_id`, `inner_subsection_id`, `title`, `material_section_no`, `save_to_library`, `user_type`, `is_default`, `is_deleted`, `is_active`, `created_at`, `updated_at`) VALUES (NULL, '0', '0', '51', '90', 'Dishwasher', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Garbage Disposal ', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Refrigerator', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Freezer', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Cooktop', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Oven', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Range/Oven', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Microwave', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Ice Maker', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Ventilation Hood', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp()), (NULL, '0', '0', '51', '90', 'Trash Compactor', '1', '1', 'A', '1', '0', '1', current_timestamp(), current_timestamp())

CREATE TABLE `homespector`.`tbl_report_email_text` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_id` BIGINT NOT NULL , `email_text_id` BIGINT NOT NULL , `text_type` ENUM('IA','R','C') NOT NULL COMMENT 'IA -> Invoice & Agreement,\r\nR -> Reports,\r\nc -> Custom' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB;


Date : 02-02-2023 End

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

Date : 03-02-2023 Start

ALTER TABLE `tbl_water_heating_equipment` ADD `garage_door_operation` LONGTEXT NULL DEFAULT NULL AFTER `limitation_id`, ADD `inspection_method` LONGTEXT NULL DEFAULT NULL AFTER `garage_door_operation`; 

Date : 03-02-2023 End

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

Date : 09-02-2023 Start

ALTER TABLE `tbl_invoice` ADD `pdf_name` LONGTEXT NULL DEFAULT NULL AFTER `payment_type`; 

ALTER TABLE `tbl_contract` ADD `generated_pdf` LONGTEXT NULL DEFAULT NULL AFTER `contract_file`; 

Date : 09-02-2023 End

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

Date : 21-02-2023 Start

ALTER TABLE `tbl_schedule_inspection` ADD `total_comment` BIGINT NULL DEFAULT NULL AFTER `inspection_subfolder`; 

Date : 21-02-2023 End

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

Date : 22-02-2023 Start

ALTER TABLE `tbl_weather` ADD `is_info` TINYINT(1) NOT NULL DEFAULT '0' AFTER `user_type`; 

Date : 22-02-2023 End

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

Date : 03-03-2023 Start

ALTER TABLE `tbl_user` CHANGE `user_type` `user_type` ENUM('I','B','BI','A') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'I' COMMENT 'I -> Inspectors, \r\nB -> Business,\r\nBI -> Business Inspector,\r\nA -> Admin'; 

ALTER TABLE `tbl_user` CHANGE `user_role` `user_role` ENUM('U','G','A') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'U' COMMENT 'U -> Normal User,\r\nG -> Guest user,\r\nA -> Admin';  

Date : 03-03-2023 End

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

Date : 06-03-2023 Start 

ALTER TABLE `tbl_schedule_inspection` CHANGE `client_info` `client_info` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `inspection_address` `inspection_address` VARCHAR(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `house_number` `house_number` VARCHAR(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `zipcode` `zipcode` VARCHAR(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `city` `city` VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `latitude` `latitude` VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `longitude` `longitude` VARCHAR(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, CHANGE `realtor_info` `realtor_info` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL; 

Date : 06-03-2023 End

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

Date : 09-03-2023 Start

CREATE TABLE `homespector`.`tbl_content` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `content_type` VARCHAR(256) NOT NULL , `content_text` LONGTEXT NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 09-03-2023 End 

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

Date : 10-03-2023 Start

CREATE TABLE `homespector`.`tbl_help_faq` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `question` LONGTEXT NOT NULL , `answer` LONGTEXT NOT NULL , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 10-03-2023 End 

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

Date : 13-03-2023

CREATE TABLE `homespector`.`tbl_capture_images` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `image_name` VARCHAR(256) NOT NULL , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB;

Date : 13-03-2023

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

Date : 05-04-2023 Start

ALTER TABLE `tbl_user` ADD `business_website` MEDIUMTEXT NULL DEFAULT NULL AFTER `business_email`; 

ALTER TABLE `tbl_schedule_inspection` CHANGE `house_number` `house_number` VARCHAR(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL; 

UPDATE `tbl_file_folder_setup` SET `title` = 'YYYYMMDD_CLIENTNAME_PROPERTYADDRESS' WHERE `tbl_file_folder_setup`.`id` = 1

UPDATE `tbl_file_folder_setup` SET `title` = 'DDMMYYYY_CLIENTNAME_PROPERTYADDRESS' WHERE `tbl_file_folder_setup`.`id` = 5

UPDATE `tbl_file_folder_setup` SET `title` = 'DDMMYYYY_ADDRESSLINE1' WHERE `tbl_file_folder_setup`.`id` = 6

UPDATE `tbl_file_folder_setup` SET `title` = 'YYYYMMDD_CLIENTNAME' WHERE `tbl_file_folder_setup`.`id` = 2

UPDATE `tbl_file_folder_setup` SET `title` = 'YYYYMMDD_ADDRESSLINE1' WHERE `tbl_file_folder_setup`.`id` = 4 

Date : 05-04-2023 End

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

Date : 06-04-2023 Start

ALTER TABLE `tbl_settings` CHANGE `inspection_folder_name` `inspection_folder_name` BIGINT(20) NOT NULL DEFAULT '2', CHANGE `inspection_subfolder_name` `inspection_subfolder_name` BIGINT(20) NOT NULL DEFAULT '1'; 

CREATE TABLE `homespector`.`tbl_inspection_fees` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `inspection_fees` MEDIUMTEXT NULL DEFAULT NULL , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB; 

Date : 06-04-2023 End

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

Date : 07-04-2023 Start

ALTER TABLE `tbl_schedule_inspection` ADD `report_pdf_name` LONGTEXT NULL DEFAULT NULL AFTER `inspection_subfolder`; 

Date : 07-04-2023 End

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

Date : 11-05-2023 Start

UPDATE `tbl_location` SET `title` = '1st Floor' WHERE `tbl_location`.`id` = 1
UPDATE `tbl_location` SET `title` = '2nd Floor' WHERE `tbl_location`.`id` = 2
UPDATE `tbl_location` SET `title` = '3rd Floor' WHERE `tbl_location`.`id` = 3
UPDATE `tbl_location` SET `title` = '4th Floor' WHERE `tbl_location`.`id` = 4
UPDATE `tbl_location` SET `title` = 'Front' WHERE `tbl_location`.`id` = 5
UPDATE `tbl_location` SET `title` = 'Rear' WHERE `tbl_location`.`id` = 6
UPDATE `tbl_location` SET `title` = 'Right' WHERE `tbl_location`.`id` = 7
UPDATE `tbl_location` SET `title` = 'Left' WHERE `tbl_location`.`id` = 8
UPDATE `tbl_location` SET `title` = 'Bottom' WHERE `tbl_location`.`id` = 9
UPDATE `tbl_location` SET `title` = 'Upper' WHERE `tbl_location`.`id` = 10  
UPDATE `tbl_location` SET `title` = 'Lower' WHERE `tbl_location`.`id` = 11
UPDATE `tbl_location` SET `title` = 'North' WHERE `tbl_location`.`id` = 12
UPDATE `tbl_location` SET `title` = 'East' WHERE `tbl_location`.`id` = 13
UPDATE `tbl_location` SET `title` = 'South' WHERE `tbl_location`.`id` = 14
UPDATE `tbl_location` SET `title` = 'West' WHERE `tbl_location`.`id` = 15
UPDATE `tbl_location` SET `title` = 'Wall' WHERE `tbl_location`.`id` = 16
UPDATE `tbl_location` SET `title` = 'Driveway' WHERE `tbl_location`.`id` = 17
UPDATE `tbl_location` SET `title` = 'Main house' WHERE `tbl_location`.`id` = 18
UPDATE `tbl_location` SET `title` = 'Roof' WHERE `tbl_location`.`id` = 19
UPDATE `tbl_location` SET `title` = 'Bedroom' WHERE `tbl_location`.`id` = 20
UPDATE `tbl_location` SET `title` = 'Kitchen' WHERE `tbl_location`.`id` = 21
UPDATE `tbl_location` SET `title` = 'Den' WHERE `tbl_location`.`id` = 22
UPDATE `tbl_location` SET `title` = 'Living room' WHERE `tbl_location`.`id` = 23
UPDATE `tbl_location` SET `title` = 'Half bath' WHERE `tbl_location`.`id` = 24
UPDATE `tbl_location` SET `title` = 'Great room' WHERE `tbl_location`.`id` = 25
UPDATE `tbl_location` SET `title` = 'Bathroom' WHERE `tbl_location`.`id` = 26
UPDATE `tbl_location` SET `title` = 'Master bedroom' WHERE `tbl_location`.`id` = 27
UPDATE `tbl_location` SET `title` = 'Master bath' WHERE `tbl_location`.`id` = 28
UPDATE `tbl_location` SET `title` = 'Dining room' WHERE `tbl_location`.`id` = 29
UPDATE `tbl_location` SET `title` = 'Garage' WHERE `tbl_location`.`id` = 30
UPDATE `tbl_location` SET `title` = 'Loft' WHERE `tbl_location`.`id` = 31
UPDATE `tbl_location` SET `title` = 'Theater' WHERE `tbl_location`.`id` = 32
UPDATE `tbl_location` SET `title` = 'Basement' WHERE `tbl_location`.`id` = 33
UPDATE `tbl_location` SET `title` = 'Crawl space' WHERE `tbl_location`.`id` = 34
UPDATE `tbl_location` SET `title` = 'Utility room' WHERE `tbl_location`.`id` = 35
UPDATE `tbl_location` SET `title` = 'Laundry' WHERE `tbl_location`.`id` = 36
UPDATE `tbl_location` SET `title` = 'All accessible areas' WHERE `tbl_location`.`id` = 37

CREATE TABLE `homespector`.`tbl_multiply_fees` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `multiply_fees` MEDIUMTEXT NULL , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB;

Date : 11-05-2023 End

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

Date : 06-06-2023 Start

ALTER TABLE `tbl_capture_images` ADD `is_flag` TINYINT(1) NOT NULL DEFAULT '0' AFTER `image_name`; 

Date : 06-06-2023 End

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

Date : 08-06-2023 Stat

UPDATE `tbl_file_folder_setup` SET `title` = 'MMDDYYYY_PROPERTYADDRESS' WHERE `tbl_file_folder_setup`.`id` = 2
UPDATE `tbl_file_folder_setup` SET `title` = 'DDMMYYYY_PROPERTYADDRESS' WHERE `tbl_file_folder_setup`.`id` = 4
UPDATE `tbl_file_folder_setup` SET `title` = 'YYYYMMDD_PROPERTYADDRESS' WHERE `tbl_file_folder_setup`.`id` = 6 

CREATE TABLE `homespector`.`tbl_rearrange_location` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `title` VARCHAR(256) NOT NULL , `save_to_library` TINYINT(1) NOT NULL DEFAULT '0' , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB;

ALTER TABLE `tbl_rearrange_location` ADD `position` BIGINT NOT NULL DEFAULT '0' AFTER `title`; 

ALTER TABLE `tbl_rearrange_location` ADD `location_id` BIGINT NOT NULL DEFAULT '0' AFTER `user_id`; 

ALTER TABLE `tbl_rearrange_location` ADD `is_default` TINYINT(1) NOT NULL DEFAULT '1' AFTER `title`; 

Date : 08-06-2023 End

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

Date : 14-06-2023 Start

ALTER TABLE `tbl_schedule_inspection` CHANGE `inspection_subfolder` `inspection_subfolder` LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL; 

ALTER TABLE `tbl_subscription_plan` ADD `duration` VARCHAR(256) NOT NULL AFTER `plan_name`; 

ALTER TABLE `tbl_subscription_plan` ADD `month_year_type` VARCHAR(256) NOT NULL AFTER `duration`; 

ALTER TABLE `tbl_subscription_plan` ADD `per_month_price` DECIMAL(6,2) NOT NULL AFTER `price`; 

UPDATE `tbl_subscription_plan` SET `duration` = 'Unlimited', `month_year_type` = 'Months' WHERE `tbl_subscription_plan`.`id` = 1

UPDATE `tbl_subscription_plan` SET `duration` = '1', `month_year_type` = 'Month', `price` = '99', `per_month_price` = '99.00' WHERE `tbl_subscription_plan`.`id` = 2

CREATE TABLE `homespector`.`tbl_subscription` ( `id` BIGINT NOT NULL AUTO_INCREMENT , `user_id` BIGINT NOT NULL , `plan_id` BIGINT NOT NULL , `subscription_date` DATETIME NOT NULL , `expiry_date` DATETIME NOT NULL , `plan_name` VARCHAR(256) NOT NULL , `purchase_token` VARCHAR(256) NOT NULL , `is_active` TINYINT(1) NOT NULL DEFAULT '1' , `is_deleted` TINYINT(1) NOT NULL DEFAULT '0' , `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `updated_at` TIMESTAMP on update CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`)) ENGINE = InnoDB;

ALTER TABLE `tbl_subscription` CHANGE `expiry_date` `expiry_date` DATETIME NULL; 

Date : 14-06-2023 End

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

Date : 29-08-2023 Start

ALTER TABLE `tbl_user` ADD `access_granted` TINYINT(1) NOT NULL DEFAULT '0' AFTER `created_by`; 

Date : 29-08-2023 End

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