aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/INSTALL.txt7
-rw-r--r--install/schema_mysql.sql6
-rw-r--r--install/schema_postgres.sql4
-rw-r--r--install/update.php34
4 files changed, 48 insertions, 3 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..3dab6c822 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`),
@@ -1132,6 +1134,7 @@ CREATE TABLE IF NOT EXISTS `site` (
`site_valid` smallint NOT NULL DEFAULT '0',
`site_dead` smallint NOT NULL DEFAULT '0',
`site_type` smallint NOT NULL DEFAULT '0',
+ `site_project` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`site_url`),
KEY `site_flags` (`site_flags`),
KEY `site_update` (`site_update`),
@@ -1143,7 +1146,8 @@ CREATE TABLE IF NOT EXISTS `site` (
KEY `site_realm` (`site_realm`),
KEY `site_valid` (`site_valid`),
KEY `site_dead` (`site_dead`),
- KEY `site_type` (`site_type`)
+ KEY `site_type` (`site_type`),
+ KEY `site_project` (`site_project`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `source` (
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index f378a3e3d..70a7a576a 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");
@@ -1123,6 +1125,7 @@ CREATE TABLE "site" (
"site_valid" smallint NOT NULL DEFAULT '0',
"site_dead" smallint NOT NULL DEFAULT '0',
"site_type" smallint NOT NULL DEFAULT '0',
+ "site_project" text NOT NULL DEFAULT '',
PRIMARY KEY ("site_url")
);
create index "site_flags" on site ("site_flags");
@@ -1135,6 +1138,7 @@ create index "site_realm" on site ("site_realm");
create index "site_valid" on site ("site_valid");
create index "site_dead" on site ("site_dead");
create index "site_type" on site ("site_type");
+create index "site_project" on site ("site_project");
CREATE TABLE "source" (
"src_id" serial NOT NULL,
diff --git a/install/update.php b/install/update.php
index ace5239b5..d6b543466 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1156 );
+define( 'UPDATE_VERSION' , 1158 );
/**
*
@@ -1885,3 +1885,35 @@ 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;
+}
+
+function update_r1157() {
+ $r1 = q("alter table site add site_project char(255) not null default '' ");
+ $r2 = q("create index site_project on site ( site_project ) ");
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+
+}
+
+