1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/13282] Use 0 as default for integer type columns in postgresql

PHPBB3-13282
This commit is contained in:
Marc Alexander
2015-01-22 00:06:25 +01:00
parent a737eeb6ce
commit 1367fc234f

View File

@@ -1574,7 +1574,15 @@ class tools
}
else
{
$default_val = "'" . $column_data[1] . "'";
// Integers need to have 0 instead of empty string as default
if (preg_match('/int/i', $column_type))
{
$default_val = '0';
}
else
{
$default_val = "'" . $column_data[1] . "'";
}
$return_array['null'] = 'NULL';
$sql .= 'NULL ';
}