Browse Source

! missing global and smf_db_add_column fixes to DbPackages-mysql.php

Spuds 12 years ago
parent
commit
bff36c1a56
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Sources/DbPackages-mysql.php

+ 3 - 1
Sources/DbPackages-mysql.php

@@ -236,7 +236,9 @@ function smf_db_add_column($table_name, $column_info, $parameters = array(), $if
 	// Now add the thing!
 	$query = '
 		ALTER TABLE ' . $table_name . '
-		ADD ' . smf_db_create_query_column($column_info);
+		ADD `' . $column_info['name'] . '` ' . $type . ' ' . (!empty($unsigned) ? $unsigned : '') . (empty($column_info['null']) ? 'NOT NULL' : '') . ' ' .
+			(!isset($column_info['default']) ? '' : 'default \'' . $smcFunc['db_escape_string']($column_info['default']) . '\'') . ' ' .
+			(empty($column_info['auto']) ? '' : 'auto_increment primary key') . ' ';
 	$smcFunc['db_query']('', $query,
 		array(
 			'security_override' => true,