@@ -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 . ')' |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $sql .= ' ('.PHP_EOL."\t".implode(','.PHP_EOL."\t", $this->cols); |
37 | 37 | |
38 | 38 | if($this->primaryKey){ |
39 | - $sql .=','.PHP_EOL."\t".'PRIMARY KEY ('.$this->quote($this->primaryKey).')'; |
|
39 | + $sql .= ','.PHP_EOL."\t".'PRIMARY KEY ('.$this->quote($this->primaryKey).')'; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $sql .= PHP_EOL.')'; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 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 | - ? $type.'('. $length . ')' |
|
71 | + ? $type.'('.$length.')' |
|
72 | 72 | : $type; |
73 | 73 | |
74 | 74 | if($attribute){ |
@@ -76,7 +76,7 @@ |
||
76 | 76 | |
77 | 77 | // @todo: whitelist types? |
78 | 78 | $nolengthtypes = ['BLOB', 'SMALLINT', 'INTEGER', 'BIGINT', 'FLOAT', |
79 | - 'DOUBLE PRECISION', 'DATE', 'TIME', 'TINYTEXT']; |
|
79 | + 'DOUBLE PRECISION', 'DATE', 'TIME', 'TINYTEXT']; |
|
80 | 80 | |
81 | 81 | $field[] = (is_int($length) || is_string($length) && count(explode(',', $length)) === 2) && !in_array($type, $nolengthtypes) |
82 | 82 | ? $type.'('. $length . ')' |
@@ -79,7 +79,7 @@ |
||
79 | 79 | 'DOUBLE PRECISION', 'DATE', 'TIME', 'TINYTEXT']; |
80 | 80 | |
81 | 81 | $field[] = (is_int($length) || is_string($length) && count(explode(',', $length)) === 2) && !in_array($type, $nolengthtypes) |
82 | - ? $type.'('. $length . ')' |
|
82 | + ? $type.'('.$length.')' |
|
83 | 83 | : $type; |
84 | 84 | |
85 | 85 |