mirror of https://github.com/MISP/MISP
chg: [server:dbSchemaDiagnostic] Support of display width and updated
`db_schema.json`pull/5767/head
parent
bb47410b9f
commit
2bae36f214
|
@ -4486,7 +4486,10 @@ class Server extends AppModel
|
|||
if (isset($field['error_type'])) {
|
||||
$length = false;
|
||||
if (in_array($field['error_type'], array('missing_column', 'column_different'))) {
|
||||
if ($field['expected']['data_type'] === 'int') {
|
||||
preg_match('/([a-z]+)(?:\((?<dw>[0-9,]+)\))?\s*([a-z]+)?/i', $field['expected']['column_type'], $displayWidthMatches);
|
||||
if (isset($displayWidthMatches['dw'])) {
|
||||
$length = $displayWidthMatches[2];
|
||||
} elseif ($field['expected']['data_type'] === 'int') {
|
||||
$length = 11;
|
||||
} elseif ($field['expected']['data_type'] === 'tinyint') {
|
||||
$length = 1;
|
||||
|
@ -4592,6 +4595,7 @@ class Server extends AppModel
|
|||
'numeric_precision',
|
||||
// 'datetime_precision', -- Only available on MySQL 5.6+
|
||||
'collation_name',
|
||||
'column_type',
|
||||
'column_default'
|
||||
)
|
||||
){
|
||||
|
|
738
db_schema.json
738
db_schema.json
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue