Open
Description
When trying to rename a DOUBLE column an exception occurs:
CREATE TABLE `01234` (
`foo` double(8,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
ALTER TABLE 01234 CHANGE foo bar DOUBLE PRECISION DEFAULT NULL;
-- Error in query (1064): Syntax error near '01234 CHANGE foo bar DOUBLE PRECISION DEFAULT NULL' at line 1
So there are two problems here:
- The table and column names aren't escaped, which causes problems for table names like "01234"
- The DOUBLE precision of 8,2 is lost
This query works as expected (equal to the query for creating the column):
ALTER TABLE `01234` CHANGE `foo` `bar` DOUBLE(8,2) DEFAULT NULL;
-- OK
I'm assuming the problems lies in the DBAL package and not in Lumen 5.2 (or Laravel).