Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error running upgrade4.15-4.15.1.sql SOLVED
11-05-2018, 09:45 AM, (This post was last modified: 11-06-2018, 12:25 AM by dalescott.)
Error running upgrade4.15-4.15.1.sql SOLVED
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.

Attached Files Thumbnail(s)
11-06-2018, 05:56 AM,
RE: Error running upgrade4.15-4.15.1.sql SOLVED
I am yet to add approval and posting to work orders and
Phil Daintree
webERP Admin
Logic Works Ltd

Forum Jump:

Users browsing this thread: 1 Guest(s)