diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-01-22 00:06:25 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-01-22 00:06:48 +0100 |
commit | 1367fc234fce4f2e79c02e3780b5727faa5992e4 (patch) | |
tree | dc9f34f26381cd8e5de25a6990ae14df6654045b | |
parent | a737eeb6cea2d494be4c8ae5e1101d1015746191 (diff) | |
download | forums-1367fc234fce4f2e79c02e3780b5727faa5992e4.tar forums-1367fc234fce4f2e79c02e3780b5727faa5992e4.tar.gz forums-1367fc234fce4f2e79c02e3780b5727faa5992e4.tar.bz2 forums-1367fc234fce4f2e79c02e3780b5727faa5992e4.tar.xz forums-1367fc234fce4f2e79c02e3780b5727faa5992e4.zip |
[ticket/13282] Use 0 as default for integer type columns in postgresql
PHPBB3-13282
-rw-r--r-- | phpBB/phpbb/db/tools.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php index f523b39fb3..ee0d247071 100644 --- a/phpBB/phpbb/db/tools.php +++ b/phpBB/phpbb/db/tools.php @@ -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 '; } |