aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorWave <tuscanhobbit@users.noreply.github.com>2015-10-19 10:28:17 +0200
committerWave <tuscanhobbit@users.noreply.github.com>2015-10-19 10:28:17 +0200
commit3e9b6a330d157ac8aa4831b57d33ec495345a9c7 (patch)
tree8c2539297a17b3f1409536b94dd4558c5a32bd08 /install
parent319b02a757ced679d0eaf141cc40db585fa6f84b (diff)
parentb54c4df74dd370c74d5822cdd00e0cf1ff52493f (diff)
downloadvolse-hubzilla-3e9b6a330d157ac8aa4831b57d33ec495345a9c7.tar.gz
volse-hubzilla-3e9b6a330d157ac8aa4831b57d33ec495345a9c7.tar.bz2
volse-hubzilla-3e9b6a330d157ac8aa4831b57d33ec495345a9c7.zip
Merge pull request #1 from redmatrix/master
Update to latest hubzilla
Diffstat (limited to 'install')
-rw-r--r--install/INSTALL.txt7
-rw-r--r--install/schema_mysql.sql2
-rw-r--r--install/schema_postgres.sql2
-rw-r--r--install/update.php24
4 files changed, 33 insertions, 2 deletions
diff --git a/install/INSTALL.txt b/install/INSTALL.txt
index 65df17fdd..c81510522 100644
--- a/install/INSTALL.txt
+++ b/install/INSTALL.txt
@@ -147,7 +147,12 @@ use SSL, your webserver must not listen on port 443 at all.
3. Create an empty database and note the access details (hostname, username,
-password, database name).
+password, database name). The MySQL client libraries will fallback to socket
+communication if the hostname is 'localhost' and some people have reported
+issues with the socket implementation. Use it if your requirements mandate.
+Otherwise if the database is served on the local server, use '127.0.0.1' for
+the hostname. See https://dev.mysql.com/doc/refman/5.0/en/connecting.html
+for more information.
4. If you know in advance that it will be impossible for the web server to
write or create files in your web directory, create an empty file called
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 0e626752d..4aaa70825 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -731,6 +731,7 @@ CREATE TABLE IF NOT EXISTS `likes` (
CREATE TABLE IF NOT EXISTS `mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`convid` int(10) unsigned NOT NULL DEFAULT '0',
+ `conv_guid` char(255) NOT NULL DEFAULT '',
`mail_flags` int(10) unsigned NOT NULL DEFAULT '0',
`from_xchan` char(255) NOT NULL DEFAULT '',
`to_xchan` char(255) NOT NULL DEFAULT '',
@@ -761,6 +762,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
KEY `parent_mid` (`parent_mid`),
KEY `expires` (`expires`),
KEY `convid` (`convid`),
+ KEY `conv_guid` (`conv_guid`),
KEY `mail_deleted` (`mail_deleted`),
KEY `mail_replied` (`mail_replied`),
KEY `mail_isreply` (`mail_isreply`),
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index f378a3e3d..f42f6b297 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -728,6 +728,7 @@ create index "likes_target_id" on likes ("target_id");
CREATE TABLE "mail" (
"id" serial NOT NULL,
"convid" bigint NOT NULL DEFAULT '0',
+ "conv_guid" text NOT NULL,
"mail_flags" bigint NOT NULL DEFAULT '0',
"from_xchan" text NOT NULL DEFAULT '',
"to_xchan" text NOT NULL DEFAULT '',
@@ -750,6 +751,7 @@ CREATE TABLE "mail" (
PRIMARY KEY ("id")
);
create index "mail_convid" on mail ("convid");
+create index "mail_conv_guid" on mail ("conv_guid");
create index "mail_created" on mail ("created");
create index "mail_flags" on mail ("mail_flags");
create index "mail_account_id" on mail ("account_id");
diff --git a/install/update.php b/install/update.php
index ace5239b5..dc9377892 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1156 );
+define( 'UPDATE_VERSION' , 1157 );
/**
*
@@ -1885,3 +1885,25 @@ function update_r1155() {
return UPDATE_FAILED;
}
+
+function update_r1156() {
+ $r1 = q("ALTER TABLE mail ADD conv_guid CHAR( 255 ) NOT NULL DEFAULT '' ");
+ $r2 = q("create index conv_guid on mail ( conv_guid ) ");
+
+ $r3 = q("select mail.id, mail.convid, conv.guid from mail left join conv on mail.convid = conv.id where true");
+ if($r3) {
+ foreach($r3 as $rr) {
+ if($rr['convid']) {
+ q("update mail set conv_guid = '%s' where id = %d",
+ dbesc($rr['guid']),
+ intval($rr['id'])
+ );
+ }
+ }
+ }
+
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+