mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/13282] Use 0 as default for integer type columns in postgresql
PHPBB3-13282
This commit is contained in:
parent
a737eeb6ce
commit
1367fc234f
1 changed files with 9 additions and 1 deletions
|
@ -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 ';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue