aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/tools.php
diff options
context:
space:
mode:
authoralf007 <alf007@free.fr>2015-05-25 00:14:48 +0200
committeralf007 <alf007@free.fr>2015-05-25 00:14:48 +0200
commit6025c40cab2d768c3cad3586fa1bfbfa6c9eeb3b (patch)
treebd40622b18c3ce4d8174f2dc717ae19a12cf3d1a /phpBB/phpbb/db/tools.php
parent6a4cb42565d7e1663da4d02cd8d624b034b20afe (diff)
parent6322970766bd9fa78327fa2ca6a6a43d73b680ee (diff)
downloadforums-6025c40cab2d768c3cad3586fa1bfbfa6c9eeb3b.tar
forums-6025c40cab2d768c3cad3586fa1bfbfa6c9eeb3b.tar.gz
forums-6025c40cab2d768c3cad3586fa1bfbfa6c9eeb3b.tar.bz2
forums-6025c40cab2d768c3cad3586fa1bfbfa6c9eeb3b.tar.xz
forums-6025c40cab2d768c3cad3586fa1bfbfa6c9eeb3b.zip
Merge pull request #1 from phpbb/develop-ascraeus
Develop ascraeus
Diffstat (limited to 'phpBB/phpbb/db/tools.php')
-rw-r--r--phpBB/phpbb/db/tools.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php
index c8d25f23a2..775deccc30 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 (strpos($column_type, 'INT') === 0)
+ {
+ $default_val = '0';
+ }
+ else
+ {
+ $default_val = "'" . $column_data[1] . "'";
+ }
$return_array['null'] = 'NULL';
$sql .= 'NULL ';
}
@@ -2175,7 +2183,7 @@ class tools
}
// no break
case 'mysql_41':
- $statements[] = 'ALTER TABLE ' . $table_name . ' ADD INDEX ' . $index_name . '(' . implode(', ', $column) . ')';
+ $statements[] = 'ALTER TABLE ' . $table_name . ' ADD INDEX ' . $index_name . ' (' . implode(', ', $column) . ')';
break;
case 'mssql':