aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-07-14 18:52:24 -0700
committerfriendica <info@friendica.com>2013-07-14 18:52:24 -0700
commit12c2cea36f09049b5f1de42be3ee761e7760dc35 (patch)
tree848c97a8b99ed553a01c0c85ef32637b58aa5504 /install
parent0fd83f3fece6a6e10629aace4377f2cfaf0b3667 (diff)
downloadvolse-hubzilla-12c2cea36f09049b5f1de42be3ee761e7760dc35.tar.gz
volse-hubzilla-12c2cea36f09049b5f1de42be3ee761e7760dc35.tar.bz2
volse-hubzilla-12c2cea36f09049b5f1de42be3ee761e7760dc35.zip
fix xtag
Diffstat (limited to 'install')
-rw-r--r--install/database.sql16
-rw-r--r--install/update.php12
2 files changed, 18 insertions, 10 deletions
diff --git a/install/database.sql b/install/database.sql
index 6b6f233b1..e7ca0e595 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -612,9 +612,7 @@ CREATE TABLE IF NOT EXISTS `obj` (
KEY `obj_type` (`obj_type`),
KEY `obj_channel` (`obj_channel`),
KEY `obj_obj` (`obj_obj`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
-
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `outq` (
`outq_hash` char(255) NOT NULL,
@@ -958,9 +956,9 @@ CREATE TABLE IF NOT EXISTS `xlink` (
CREATE TABLE IF NOT EXISTS `xprof` (
`xprof_hash` char(255) NOT NULL,
+ `xprof_age` tinyint(3) unsigned NOT NULL DEFAULT '0',
`xprof_desc` char(255) NOT NULL DEFAULT '',
`xprof_dob` char(12) NOT NULL DEFAULT '',
- `xprof_age` tinyint(3) NOT NULL DEFAULT '0',
`xprof_gender` char(255) NOT NULL DEFAULT '',
`xprof_marital` char(255) NOT NULL DEFAULT '',
`xprof_sexual` char(255) NOT NULL DEFAULT '',
@@ -972,19 +970,21 @@ CREATE TABLE IF NOT EXISTS `xprof` (
PRIMARY KEY (`xprof_hash`),
KEY `xprof_desc` (`xprof_desc`),
KEY `xprof_dob` (`xprof_dob`),
- KEY `xprof_age` (`xprof_age`),
KEY `xprof_gender` (`xprof_gender`),
KEY `xprof_marital` (`xprof_marital`),
KEY `xprof_sexual` (`xprof_sexual`),
KEY `xprof_locale` (`xprof_locale`),
KEY `xprof_region` (`xprof_region`),
KEY `xprof_postcode` (`xprof_postcode`),
- KEY `xprof_country` (`xprof_country`)
+ KEY `xprof_country` (`xprof_country`),
+ KEY `xprof_age` (`xprof_age`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `xtag` (
+ `xtag_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`xtag_hash` char(255) NOT NULL,
`xtag_term` char(255) NOT NULL DEFAULT '',
- PRIMARY KEY (`xtag_hash`),
- KEY `xtag_term` (`xtag_term`)
+ PRIMARY KEY (`xtag_id`),
+ KEY `xtag_term` (`xtag_term`),
+ KEY `xtag_hash` (`xtag_hash`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
diff --git a/install/update.php b/install/update.php
index 051090768..f02676e2a 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1050 );
+define( 'UPDATE_VERSION' , 1051 );
/**
*
@@ -609,4 +609,12 @@ function update_r1049() {
if($r)
return UPDATE_SUCCESS;
return UPDATE_FAILED;
-} \ No newline at end of file
+}
+
+function update_r1050() {
+ $r = q("ALTER TABLE `xtag` DROP PRIMARY KEY , ADD `xtag_id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST , ADD INDEX ( `xtag_hash` ) ");
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}