use socle;
CREATE TABLE company_compensation (
	id INT AUTO_INCREMENT PRIMARY KEY,
    country  varchar(255) NULL,
	city  varchar(255) NULL,
	site VARCHAR(1) NULL,
	matricule VARCHAR(255) NULL,
	department VARCHAR(255) NULL,
	`function` VARCHAR(255) NULL,
	internal_grade VARCHAR(255) NULL,
	gender VARCHAR(2) NULL,
	birthday DATE NULL,
    hiring_date DATE NULL,
	function_code VARCHAR(255) NULL, 
	subfunction_code VARCHAR(255) NULL, -- changed instead of discipline_code 
	collaborative_path VARCHAR(255) NULL, -- changed instead of level_career_path  
	grade VARCHAR(255) NULL, -- changed instead of job_grade
	number_employees_supervised INT NULL,
	devise VARCHAR(10) NULL,
	gross_annual_salary TEXT NULL,
	number_monthly_salary VARCHAR(255) NULL,
	type_overtime_pay VARCHAR(255) NULL,
	seniority_bonus INT NULL, -- new
	schooling_allowance INT NULL, -- new
	meal_allowance INT NULL,
	location_allowance VARCHAR(255) NULL,
	transportation_allowance INT NULL,
	other_bonuses_awarded_last_year INT NULL , -- changed instead of other_bonuses_awarded
	fixed_allowances INT NULL,
	eligibility_performance_bonus VARCHAR(10) NULL,
	target_performance_bonus VARCHAR(255) NULL,
	total_amount_performance_bonus_awarded TEXT NULL,
	eligibility_commissions VARCHAR(1) NULL,
	target_variable_sales_compensation VARCHAR(5) NULL ,
	total_amount_sales_bonus_awarded VARCHAR(255) NULL,
	total_amount_sales_commissions_awarded VARCHAR(255) NULL,
	car_benefit_eligibility VARCHAR(1) NULL,
	car_depreciation TEXT NULL,
	annual_cost_car_depreciation TEXT NULL,
    car_allocation_eligibility varchar(1) NULL ,
	annual_cost_car_allocation TEXT NULL ,
    poste VARCHAR(255) NULL,
	companyId INT NULL,
	FOREIGN KEY (companyId) REFERENCES company(id) ON DELETE CASCADE ON UPDATE CASCADE
);