Closed shemgp closed 7 years ago
Just tested this code:
$default = 0;
if (in_array($default, ['CURRENT_TIMESTAMP']))
{
echo 'found';
}
and it returns found
. That's why the DB::raw's were being added.
Updated pull request to use strict mode for in_array
.
Love that you changed it to strict instead, much better solution!
When there's a DB::raw('0') in a boolean's default value, in PostgreSQL, the following error occurs:
Here's a sample schema that generates the error:
Here's the schema that doesn't have the error: