CREATE TABLE `tbltenant_insurance_details` (
  `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `tenant_id` BIGINT(20) UNSIGNED NOT NULL,
  `insurance_provider_slug` VARCHAR(100) DEFAULT NULL,
  `insurance_provider` VARCHAR(200) DEFAULT NULL,
  `insurance_type_slug` VARCHAR(100) DEFAULT NULL,
  `insurance_type` VARCHAR(200) DEFAULT NULL,
  `filename` VARCHAR(191) DEFAULT NULL,
  `original_file_name` VARCHAR(191) DEFAULT NULL,
  `added_on` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(),
  `updated_on` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP(),
  PRIMARY KEY (`id`),
  KEY `tenant_id` (`tenant_id`)
) ENGINE=INNODB  DEFAULT CHARSET=utf8;

UPDATE `tblonboarding_steps_static` SET code_name= 'license', NAME='Add Your Licenses' , DESCRIPTION ='If you’re licensed, you can add your license information to show the “Licensed” badge on your Estimates.' WHERE code_name = 'insurance_and_license';
UPDATE `tblonboarding_steps_static` SET `order` = '110'  WHERE code_name = 'next_insurance';
INSERT INTO `tblonboarding_steps_static` (`code_name`, `name`, `description`, `icon`,`skip_text`, `order`, `parent`, `percentage`, `button_text`) VALUES
('insurance', 'Add Your Insurance', 'If you’re insured, you can add your insurance information to show on your Estimates.', 'insurance_and_license.png','Skip This Step', 1, NULL, 0, 'Add Your Insurance Details');

INSERT INTO tbltenant_onboarding_steps (tenant_id, onboarding_steps_static_id, STATUS,added_on,updated_on)
SELECT t.id AS tenant_id,os.id AS onboarding_steps_static_id, 0 AS STATUS, NOW() AS added_on , NOW() AS updated_on FROM tbltenants AS t 
JOIN tblonboarding_steps_static AS os ON 1=1 WHERE os.code_name='insurance' ORDER BY t.id , os.id ASC ;


UPDATE tblapad_options SET VALUE='{"image":["jpeg","jpg","png","webp"],"video":[],"audio":[],"document":["pdf","doc","docx"]}' 
WHERE TYPE = 'insurance_license' AND NAME = 'allowed_file_extention' ;