im building up this database for my [homework] application and i keep gettting the 'error:150', i know it has to do with the way the foreign key is formed, I can't see what the problem is though:
CREATE TABLE shift(
shiftID INT NOT NULL,
shift_date DATE NOT NULL,
start_time TIME NOT NULL,
end_time TIME NOT NULL,
PRIMARY KEY (shiftID, shift_date, start_time, end_time)
);
CREATE TABLE shift_day(
shift_date DATE,
dayOfWeek VARCHAR(10),
PRIMARY KEY(shift_date),
FOREIGN KEY(shift_date) REFERENCES shift(shift_date)
);