FIX allow for spaces in enum field-type default values

This commit is contained in:
devimust 2015-05-02 11:09:54 +00:00
parent bddbdde5de
commit 9a2dc1adc8

View File

@ -721,7 +721,7 @@ class PostgreSQLDatabase extends SS_Database {
// TODO: this returns an empty array for the following string: int(11) not null auto_increment
// on second thoughts, why is an auto_increment field being passed through?
$pattern = '/^([\w()]+)\s?((?:not\s)?null)?\s?(default\s[\w\']+)?\s?(check\s[\w()\'",\s]+)?$/i';
$pattern = '/^([\w()]+)\s?((?:not\s)?null)?\s?(default\s[\w\s\']+)?\s?(check\s[\w()\'",\s]+)?$/i';
preg_match($pattern, $colSpec, $matches);
if(sizeof($matches)==0) return '';