Unfortunately MySQL does not support SQL check constraints.
So try using enum
instead
CREATE TABLE IF NOT EXISTS supervisor (
sup_id INT(3) NOT NULL,
sup_name VARCHAR(30) NOT NULL,
gen enum('M','F') NOT NULL,
dep_id INT(4),
PRIMARY KEY (sup_id),
INDEX (dep_id),
FOREIGN KEY (dep_id)
REFERENCES department(dep_id)
ON UPDATE CASCADE ON DELETE RESTRICT
);