webERP Forum

Full Version: Error running upgrade4.15-4.15.1.sql SOLVED
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I tried to manually upgrade from 4.15 to 4.15.1 to test Phil's new Timesheets.php script. I executed sql/mysql/upgrade4.15-4.15.1.sql using phpmyadmin but it returned the following error.

Static analysis:

1 errors were found during analysis.

A closing bracket was expected. (near ")" at position 629)
SQL query:

CREATE TABLE `employees` ( `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, `surname` varchar(20) NOT NULL, `firstname` varchar(20) NOT NULL, `stockid` varchar(20) NOT NULL COMMENT 'FK with stockmaster', `manager` int(11) COMMENT 'an employee also in this table', `normalhours` double NOT NULL DEFAULT '40', `userid` varchar(20) NOT NULL DEFAULT '' COMMENT 'loose FK with www-users will have some employees who are not users', `email` varchar(55) NOT NULL DEFAULT '', KEY `surname` (`surname`), KEY `firstname` (`firstname`), KEY `stockid` (`stockid`), KEY `manager` (`manager`), KEY `userid` (`userid`)

MySQL said: Documentation

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 14

The error from Adminer was more descriptive, see attached screenshot. IIUC, the error is due to a semi-colon that should have been a comment. I will submit a pull request for the change.

Fwiw, I'm running the master branch from Github (, using Apache 2.4, MariaDB 10.2.28 and PHP 7.2 on FreeBSD 11.2.

Update 2018-11-05. Phil committed corrected upgrade4.15-4.15.1.sql file to repo.
I am yet to add approval and posting to work orders and
Reference URL's