@@ -65,7 +65,7 @@ |
||
65 | 65 | |
66 | 66 | // @todo: whitelist types? |
67 | 67 | $nolengthtypes = ['DATE', 'TINYBLOB', 'TINYTEXT', 'BLOB', 'TEXT', 'MEDIUMBLOB', |
68 | - 'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID']; |
|
68 | + 'MEDIUMTEXT', 'LONGBLOB', 'LONGTEXT', 'SERIAL', 'BOOLEAN', 'UUID']; |
|
69 | 69 | |
70 | 70 | $field[] = (is_int($length) || is_string($length) && count(explode(',', $length)) === 2) && !in_array($type, $nolengthtypes) |
71 | 71 | ? $type.'('. $length . ')' |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | if($this->primaryKey){ |
53 | 53 | $sql .=','.PHP_EOL."\t".'PRIMARY KEY ('.$this->quote($this->primaryKey) |
54 | - .(in_array($this->dir, ['ASC', 'DESC']) ? $this->dir : '').')'; |
|
54 | + .(in_array($this->dir, ['ASC', 'DESC']) ? $this->dir : '').')'; |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | $sql .= PHP_EOL.')'; |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | |
89 | 89 | if(is_int($length)&& in_array($type, ['CHAR', 'NCHAR','VARCHAR', 'NVARCHAR', 'CHARACTER']) |
90 | - || is_string($length) && count(explode(',', $length)) === 2 && $type === 'DECIMAL'){ |
|
90 | + || is_string($length) && count(explode(',', $length)) === 2 && $type === 'DECIMAL'){ |
|
91 | 91 | $field[] = $type_translation.'('. $length . ')'; |
92 | 92 | } |
93 | 93 | else{ |