php-mysql-diff
php-mysql-diff copied to clipboard
Please fix your regex
I have tested some formated sql scripts and after formated your regex not recognize some columns:
for example this is not recognized:
``quantity decimal(11, 2) unsigned NOT NULL DEFAULT '0.00',
because there is formated (11, 2) with space between number 2.
Your regex:
decimal\((?<decimalLength>\d+),(?<decimalPrecision>\d+)\)(?:\s+unsigned)?
do nothing.
I temporary fixed by this line:
decimal\((?<decimalLength>\d+),(?<decimalPrecision>\s*\d+)\)(?:\s+unsigned)?
Can you fix it in your code please to other columns type?