We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
must add new function to handle enum and set
/** * Method _extra_enum_set_handle * * @param $string $string [explicite description] * * @return String */ public function _extra_enum_set_handle($string = null) { $find = ['/(^\w+\(?)/', '/(\)$)/']; // reg 'a(' or ')' $replace_type = preg_replace($find, '', $string); /// replace first string of type ex set('es','ea') or enum('1','11') return $replace_type; }
in function get_function_up_content change to:
if (!isset($match[2])) { switch (strtoupper($match[0])) { //type enum need extra handle case 'ENUM': $add_field_str .= "\t\t\t\t'constraint' => [" . $this->_extra_enum_set_handle($column['Type']) . "],\n"; break; // Add SET type case 'SET': $add_field_str .= "\t\t\t\t'constraint' => [" . $this->_extra_enum_set_handle($column['Type']) . "],\n"; break; default: $add_field_str .= "\t\t\t\t'constraint' => '" . strtoupper($column['Type']) . "'," . "\n"; break; } }
on Line 320 constraint is number
else{ /// constraint not number if(is_numeric($match[2])){ $add_field_str .= "\t\t\t\t'constraint' => '" . strtoupper($match[2]) . "'," . "\n"; } }
RESULT:
'field' => array( 'type' => 'SET', 'constraint SET' => ['aaa','bbb','ccc','ddd','ffff'], ),
The text was updated successfully, but these errors were encountered:
type ENUM end SET need extra handle corvenik-ian#6
60ed97a
8e068c6
Thx, I will fix this on this weekend.
Sorry, something went wrong.
No branches or pull requests
must add new function to handle enum and set
in function get_function_up_content change to:
on Line 320
constraint is number
RESULT:
The text was updated successfully, but these errors were encountered: