We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d12e8d commit 685b570Copy full SHA for 685b570
Convertor.class.php
@@ -335,10 +335,11 @@ private function convert_field_data($attrs)
335
if (isset($attrs['Default'])) {
336
if ($attrs['Default'] != "") {
337
//TODO: See more cases!
338
- if (is_numeric($attrs['Default']) || in_array($attrs['Default'], $this->defaultWords)) {
339
- $fieldStr .= " DEFAULT ".$attrs['Default'];
+ if (substr($attrs['Type'], 0, 4) != "enum"
+ && (is_numeric($attrs['Default']) || in_array($attrs['Default'], $this->defaultWords))) {
340
+ $fieldStr .= " DEFAULT " . $attrs['Default'];
341
} else {
- $fieldStr .= " DEFAULT '".$attrs['Default']."'";
342
+ $fieldStr .= " DEFAULT '" . $attrs['Default'] . "'";
343
}
344
345
0 commit comments