mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Update for topic_moved_id
git-svn-id: file:///svn/phpbb/trunk@1719 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e2bba5b6ff
commit
8c6527553c
1 changed files with 18 additions and 4 deletions
|
@ -18,6 +18,8 @@ switch(SQL_LAYER)
|
||||||
ADD INDEX (user_session_time)";
|
ADD INDEX (user_session_time)";
|
||||||
$sql[] = "ALTER TABLE " . SEARCH_TABLE . "
|
$sql[] = "ALTER TABLE " . SEARCH_TABLE . "
|
||||||
MODIFY search_id int(11) NOT NULL";
|
MODIFY search_id int(11) NOT NULL";
|
||||||
|
$sql[] = "ALTER TABLE " . TOPICS_TABLE . "
|
||||||
|
MODIFY topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'postgresql':
|
case 'postgresql':
|
||||||
|
@ -57,21 +59,33 @@ switch(SQL_LAYER)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$errored = false;
|
||||||
for($i = 0; $i < count($sql); $i++)
|
for($i = 0; $i < count($sql); $i++)
|
||||||
{
|
{
|
||||||
echo "Running :: " . $sql[$i] . "<br />\n";
|
echo "Running >>> " . $sql[$i];
|
||||||
|
|
||||||
$result = $db->sql_query($sql[$i]);
|
$result = $db->sql_query($sql[$i]);
|
||||||
|
|
||||||
if( !$result )
|
if( !$result )
|
||||||
{
|
{
|
||||||
|
$errored = true;
|
||||||
$error = $db->sql_error();
|
$error = $db->sql_error();
|
||||||
die("Failed executing statement<br />\nError :: " . $error['message'] . "<br />\nSQL :: " . $sql[$i]);
|
echo " :: <b>FAILED</b> <u>( " . $error['message'] . " )</u><br /><br />\n\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo " :: <b>COMPLETED</b><br /><br />\n\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( $errored )
|
||||||
|
{
|
||||||
|
echo "\n<br /><br />Errors occured! Please check and correct issues as required<br />\n";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
echo "\n<br /><br />\nCOMPLETE! Please delete this file before continuing!<br />\n";
|
echo "\n<br /><br />\nCOMPLETE! Please delete this file before continuing!<br />\n";
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Add table
Reference in a new issue