mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 07:18:08 +02:00
- Bring MS SQL up to par
git-svn-id: file:///svn/phpbb/trunk@7871 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -726,7 +726,7 @@ if (version_compare($current_version, '3.0.RC3', '<='))
|
|||||||
{
|
{
|
||||||
// last version, mssql had issues with index removal
|
// last version, mssql had issues with index removal
|
||||||
case 'mssql':
|
case 'mssql':
|
||||||
$sql = 'DROP INDEX ' . $table_name . '\.' . $bad_index;
|
$sql = 'DROP INDEX ' . $table_name . '.' . $bad_index;
|
||||||
_sql($sql, $errored, $error_ary);
|
_sql($sql, $errored, $error_ary);
|
||||||
|
|
||||||
$no_updates = false;
|
$no_updates = false;
|
||||||
@@ -1166,7 +1166,8 @@ function prepare_column_data($dbms, $column_data)
|
|||||||
case 'mssql':
|
case 'mssql':
|
||||||
$sql .= " {$column_type} ";
|
$sql .= " {$column_type} ";
|
||||||
|
|
||||||
if (!is_null($column_data[1]))
|
// we do not support MSSQL DEFAULTs for the near future
|
||||||
|
/*if (!is_null($column_data[1]))
|
||||||
{
|
{
|
||||||
// For hexadecimal values do not use single quotes
|
// For hexadecimal values do not use single quotes
|
||||||
if (strpos($column_data[1], '0x') === 0)
|
if (strpos($column_data[1], '0x') === 0)
|
||||||
@@ -1177,7 +1178,7 @@ function prepare_column_data($dbms, $column_data)
|
|||||||
{
|
{
|
||||||
$sql .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
|
$sql .= 'DEFAULT (' . ((is_numeric($column_data[1])) ? $column_data[1] : "'{$column_data[1]}'") . ') ';
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
$sql .= 'NOT NULL';
|
$sql .= 'NOT NULL';
|
||||||
break;
|
break;
|
||||||
@@ -1464,7 +1465,7 @@ function sql_index_drop($dbms, $index_name, $table_name)
|
|||||||
switch ($dbms)
|
switch ($dbms)
|
||||||
{
|
{
|
||||||
case 'mssql':
|
case 'mssql':
|
||||||
$sql = 'DROP INDEX ' . $table_name . '\.' . $index_name;
|
$sql = 'DROP INDEX ' . $table_name . '.' . $index_name;
|
||||||
_sql($sql, $errored, $error_ary);
|
_sql($sql, $errored, $error_ary);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user