diff options
Diffstat (limited to 'install')
-rw-r--r-- | install/database.sql | 4 | ||||
-rw-r--r-- | install/update.php | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/install/database.sql b/install/database.sql index 03279d6aa..3deb96c21 100644 --- a/install/database.sql +++ b/install/database.sql @@ -892,11 +892,13 @@ CREATE TABLE IF NOT EXISTS `xlink` ( `xlink_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `xlink_xchan` char(255) NOT NULL DEFAULT '', `xlink_link` char(255) NOT NULL DEFAULT '', + `xlink_rating` int(11) NOT NULL DEFAULT '0', `xlink_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`xlink_id`), KEY `xlink_xchan` (`xlink_xchan`), KEY `xlink_link` (`xlink_link`), - KEY `xlink_updated` (`xlink_updated`) + KEY `xlink_updated` (`xlink_updated`), + KEY `xlink_rating` (`xlink_rating`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `xprof` ( diff --git a/install/update.php b/install/update.php index 301d6e06f..7cdeb0e89 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1028 ); +define( 'UPDATE_VERSION' , 1029 ); /** * @@ -350,3 +350,10 @@ ADD INDEX ( `abook_rating` )"); return UPDATE_FAILED; } +function update_r1028() { + $r = q"ALTER TABLE `xlink` ADD `xlink_rating` INT NOT NULL DEFAULT '0' AFTER `xlink_link` , +ADD INDEX ( `xlink_rating` ) "); + if($r) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} |