1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 08:17:47 +02:00

Merge pull request #3321 from marc1706/ticket/13282

[ticket/13282] Use 0 as default for integer type columns in postgresql
This commit is contained in:
Joas Schilling
2015-01-23 17:32:28 +01:00
3 changed files with 87 additions and 1 deletions

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 (strpos($column_type, 'INT') === 0)
{
$default_val = '0';
}
else
{
$default_val = "'" . $column_data[1] . "'";
}
$return_array['null'] = 'NULL';
$sql .= 'NULL ';
}