1
0
mirror of https://github.com/e107inc/e107.git synced 2025-05-04 03:16:23 +02:00

MySQL 8.0.17+ support: INT types no longer return a width specification

Fixes: 
This commit is contained in:
Nick Liu 2020-07-16 17:30:57 -05:00
parent 3fcbcd34c0
commit aee67c1399
No known key found for this signature in database
GPG Key ID: 1167C5F9C9897637

@ -154,6 +154,16 @@ class db_verify
$actual['default'] = preg_replace("/DEFAULT '(\d*\.?\d*)'/i", 'DEFAULT $1', $actual['default'] );
}
/**
* Display width specification for integer data types was deprecated in MySQL 8.0.17
* @see https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-19.html
*/
if(1 === preg_match('/([A-Z]*INT)/i', $expected['type']))
{
$expected['value'] = '';
$actual['value'] = '';
}
// Correct difference on CREATE TABLE statement between MariaDB and MySQL
if(1 === preg_match('/(DATE|DATETIME|TIMESTAMP|TIME|YEAR)/i', $expected['default']))
{