CREATE TABLE traveltime_payroll_exports (
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	when_requested DATETIME NOT NULL,
	requester_id INT,
	FOREIGN KEY fk_requester (requester_id) REFERENCES users (id)
) ENGINE=InnoDB;

ALTER TABLE traveltime_submission_timedetails ADD COLUMN payroll_export_id INT DEFAULT NULL;

ALTER TABLE traveltime_submission_timedetails ADD FOREIGN KEY fk_export (payroll_export_id) REFERENCES traveltime_payroll_exports (id);
