2
0
Эх сурвалжийг харах

! Use uppercase types in db_add_column will not fail any more in postgreSQL and SQlite [Bug 4826]

emanuele 13 жил өмнө
parent
commit
ba8ff00f62

+ 2 - 0
Sources/DbPackages-postgresql.php

@@ -629,6 +629,8 @@ function smf_db_remove_index($table_name, $index_name, $parameters = array(), $e
  */
 function smf_db_calculate_type($type_name, $type_size = null, $reverse = false)
 {
+	// Let's be sure it's lowercase MySQL likes both, others no.
+	$type_name = strtolower($type_name);
 	// Generic => Specific.
 	if (!$reverse)
 	{

+ 2 - 0
Sources/DbPackages-sqlite.php

@@ -420,6 +420,8 @@ function smf_db_remove_index($table_name, $index_name, $parameters = array(), $e
  */
 function smf_db_calculate_type($type_name, $type_size = null, $reverse = false)
 {
+	// Let's be sure it's lowercase MySQL likes both, others no.
+	$type_name = strtolower($type_name);
 	// Generic => Specific.
 	if (!$reverse)
 	{