CREATE TABLE IF NOT Exists `proll_employee_detail` (
	`empid` INT(11) NOT NULL,
	`empcode` INT(11) NULL DEFAULT NULL,
	`employeeno` VARCHAR(25) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`sap_id` VARCHAR(25) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`gbsStatus` ENUM('GBS','Non-GBS') NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`employeementDatCurrent` VARCHAR(30) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`employeementRegionCurrent` INT(11) NULL DEFAULT NULL,
	`qualification` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`personalEmail` VARCHAR(150) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`visaStatus` VARCHAR(150) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`lastAnnBonusPayout` VARCHAR(20) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`bonusCategory` ENUM('AIP','LAIP','Other') NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`previous_appraisal_rating` DOUBLE NULL DEFAULT NULL,
	`PPRRating` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`PPRLastYear` VARCHAR(50) NULL DEFAULT NULL COMMENT 'HR' COLLATE 'latin1_swedish_ci',
	`lastPromotionDate` VARCHAR(50) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`emgContactPerson` VARCHAR(100) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`emgContactNo` VARCHAR(50) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`homeCountryAddress` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`homeCountryContactNo` VARCHAR(50) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`bloodGroup` ENUM('A+','A-','AB+','AB-','B-','O+','O-') NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`gender` ENUM('Male','Female') NOT NULL DEFAULT 'Male' COLLATE 'latin1_swedish_ci',
	`bank_name` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`bank_account` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`branch` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`lastworkingdate` DATE NULL DEFAULT NULL,
	`last_market_adj_date` DATE NULL DEFAULT NULL,
	`dateoflastincrement` VARCHAR(20) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`managername` VARCHAR(200) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`manageremail` VARCHAR(200) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	`departmentname` VARCHAR(200) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	PRIMARY KEY (`empid`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;



ALTER TABLE `proll_employee_detail`
	CHANGE COLUMN `empid` `id` INT(11) NOT NULL auto_increment;
ALTER TABLE `proll_employee_detail`
	ADD COLUMN `employee_id` INT(11) NULL;
ALTER TABLE `proll_employee_detail`
	Add COLUMN `empid` INT(10) UNSIGNED NULL DEFAULT NULL ,
	ADD CONSTRAINT `FK_proll_employee_detail_proll_employee` FOREIGN KEY (`empid`) REFERENCES `proll_employee` (`id`) ON UPDATE NO ACTION ON DELETE NO ACTION;


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
