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:
@@ -1573,8 +1573,16 @@ class tools
|
||||
$sql .= 'NOT NULL ';
|
||||
}
|
||||
else
|
||||
{
|
||||
// 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 ';
|
||||
}
|
||||
|
Reference in New Issue
Block a user