1 |
<?php |
2 |
|
3 |
# File to upgrade PHP-Nuke from 2.5 to 3.5 |
4 |
# After use this, you can delete it |
5 |
|
6 |
include("config.php"); |
7 |
include("mainfile.php"); |
8 |
dbconnect(); |
9 |
|
10 |
$result = mysql_query("CREATE TABLE ephem (eid int(11) DEFAULT '0' NOT NULL auto_increment, did int(2) DEFAULT '0' NOT NULL, mid int(2) DEFAULT '0' NOT NULL, yid int(4) DEFAULT '0' NOT NULL, content text NOT NULL, PRIMARY KEY (eid))"); |
11 |
if (!$result) { |
12 |
echo "Creation of ephem table failed!<br>" .mysql_errno(). ": ".mysql_error(). "<br>"; |
13 |
return; |
14 |
} |
15 |
|
16 |
$result = mysql_query("ALTER TABLE stories DROP hits"); |
17 |
if (!$result) { |
18 |
echo "Alteration of stories table failed!<br>" .mysql_errno(). ": ".mysql_error(). "<br>"; |
19 |
return; |
20 |
} |
21 |
|
22 |
$result = mysql_query("ALTER TABLE stories CHANGE introtext hometext text"); |
23 |
if (!$result) { |
24 |
echo "Alteration of stories table failed!<br>" .mysql_errno(). ": ".mysql_error(). "<br>"; |
25 |
return; |
26 |
} |
27 |
|
28 |
$result = mysql_query("ALTER TABLE stories CHANGE fulltext bodytext text"); |
29 |
if (!$result) { |
30 |
echo "Alteration of stories table failed!<br>" .mysql_errno(). ": ".mysql_error(). "<br>"; |
31 |
return; |
32 |
} |
33 |
|
34 |
echo "PHP-Nuke Tables Updated, Ok..."; |
35 |
?> |