set foreign_key_checks = 0;

ALTER table VehicleMakeMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table InsuranceCompanyMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table MaritalStatusMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table ReligiousGroupMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table DocumentTypeMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table RelationMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table DeclineReasonMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table WriteoffReasonMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table IdentityProofMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table AddressProofMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table EducationLevelMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

ALTER table ExternalLoanSourceMaster
ADD COLUMN `ui_name` VARCHAR(100) DEFAULT NULL AFTER `name`,
ADD COLUMN `system_defined` TINYINT(1) NOT NULL DEFAULT 1;

set foreign_key_checks = 1;

update VehicleMakeMaster set ui_name = name;
update InsuranceCompanyMaster set ui_name = name;
update MaritalStatusMaster set ui_name = name;
update ReligiousGroupMaster set ui_name = name;
update DocumentTypeMaster set ui_name = name;
update RelationMaster set ui_name = name;
update DeclineReasonMaster set ui_name = name;
update WriteoffReasonMaster set ui_name = name;
update IdentityProofMaster set ui_name = name;
update AddressProofMaster set ui_name = name;
update EducationLevelMaster set ui_name = name;
update ExternalLoanSourceMaster set ui_name = name;
