Phil, there was a git conflict when you committed to sql/mysql/upgrade4.15-4.15.1.sql leaving the conflict messages in the file:
<<<<<<< HEAD
KEY `userid` (`userid`);
=======
KEY `userid` (`userid`),
>>>>>>> upstream/master
don't shoot the messenger
Also I note that you hard coded access token 20 into the scripts. I think hard coding access tokens is a bit of a nasty hack as they can be changed and re-used - it is possible to change token 20, and use it as something else.
Better to set a flag in www_users for whether they can create time sheets. See how I did the create tenders flag for an example.
Tim