aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/database.sql6
-rw-r--r--install/update.php9
2 files changed, 12 insertions, 3 deletions
diff --git a/install/database.sql b/install/database.sql
index 056124649..30b8edfd7 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -829,6 +829,7 @@ CREATE TABLE IF NOT EXISTS `term` (
`term` char(255) NOT NULL,
`url` char(255) NOT NULL,
`imgurl` char(255) NOT NULL,
+ `term_hash` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`tid`),
KEY `oid` (`oid`),
KEY `otype` (`otype`),
@@ -836,7 +837,8 @@ CREATE TABLE IF NOT EXISTS `term` (
KEY `term` (`term`),
KEY `uid` (`uid`),
KEY `aid` (`aid`),
- KEY `imgurl` (`imgurl`)
+ KEY `imgurl` (`imgurl`),
+ KEY `term_hash` (`term_hash`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `tokens` (
@@ -933,7 +935,7 @@ CREATE TABLE IF NOT EXISTS `xlink` (
KEY `xlink_link` (`xlink_link`),
KEY `xlink_updated` (`xlink_updated`),
KEY `xlink_rating` (`xlink_rating`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `xprof` (
`xprof_hash` char(255) NOT NULL,
diff --git a/install/update.php b/install/update.php
index c57b8562e..ee95b7e01 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1046 );
+define( 'UPDATE_VERSION' , 1047 );
/**
*
@@ -565,3 +565,10 @@ ADD INDEX ( `site_register` ) ");
return UPDATE_FAILED;
}
+function update_r1046() {
+ $r = q("ALTER TABLE `term` ADD `term_hash` CHAR( 255 ) NOT NULL DEFAULT '',
+ADD INDEX ( `term_hash` ) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}