From 277da4363194bd652918b100b93fdb0a85f9f689 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 22 Feb 2018 20:52:39 -0800 Subject: provide DB compatibility for poll and voting implementations across several platforms --- Zotlabs/Update/_1204.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Zotlabs/Update/_1204.php (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1204.php b/Zotlabs/Update/_1204.php new file mode 100644 index 000000000..f55526415 --- /dev/null +++ b/Zotlabs/Update/_1204.php @@ -0,0 +1,34 @@ + Date: Fri, 23 Feb 2018 12:58:03 +0100 Subject: fix issues with DB update 1204 --- Zotlabs/Update/_1204.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1204.php b/Zotlabs/Update/_1204.php index f55526415..93c2e4e3f 100644 --- a/Zotlabs/Update/_1204.php +++ b/Zotlabs/Update/_1204.php @@ -7,7 +7,7 @@ class _1204 { function run() { if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { - $r1 = q("ALTER TABLE poll ADD pull_guid text NOT NULL"); + $r1 = q("ALTER TABLE poll ADD poll_guid text NOT NULL"); $r2 = q("create index \"poll_guid_idx\" on poll \"poll_guid\""); $r3 = q("ALTER TABLE poll_elm ADD pelm_guid text NOT NULL"); $r4 = q("create index \"pelm_guid_idx\" on poll_elm \"pelm_guid\""); @@ -17,9 +17,9 @@ class _1204 { $r = ($r1 && $r2 && $r3 && $r4 && $r5 && $r6); } else { - $r1 = q("ALTER TABLE `poll` ADD `pull_guid` VARCHAR(191) NOT NULL, ADD INDEX `poll_guid` (`pull_guid`) "); + $r1 = q("ALTER TABLE `poll` ADD `poll_guid` VARCHAR(191) NOT NULL, ADD INDEX `poll_guid` (`poll_guid`) "); $r2 = q("ALTER TABLE `poll_elm` ADD `pelm_guid` VARCHAR(191) NOT NULL, ADD INDEX `pelm_guid` (`pelm_guid`) "); - $r1 = q("ALTER TABLE `vote` ADD `vote_guid` VARCHAR(191) NOT NULL, ADD INDEX `vote_guid` (`vote_guid`) "); + $r3 = q("ALTER TABLE `vote` ADD `vote_guid` VARCHAR(191) NOT NULL, ADD INDEX `vote_guid` (`vote_guid`) "); $r = ($r1 && $r2 && $r3); } -- cgit v1.2.3 From 51c0e5a988ce3bae025040ab7fa77852eaa3e70d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 26 Feb 2018 09:58:42 +0100 Subject: another DB upgrade to address some long running maintenance queries --- Zotlabs/Update/_1205.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Zotlabs/Update/_1205.php (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1205.php b/Zotlabs/Update/_1205.php new file mode 100644 index 000000000..5384f183e --- /dev/null +++ b/Zotlabs/Update/_1205.php @@ -0,0 +1,27 @@ + Date: Wed, 28 Feb 2018 10:21:22 +0100 Subject: missed one index in the last update --- Zotlabs/Update/_1206.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Zotlabs/Update/_1206.php (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1206.php b/Zotlabs/Update/_1206.php new file mode 100644 index 000000000..bb2000aad --- /dev/null +++ b/Zotlabs/Update/_1206.php @@ -0,0 +1,24 @@ + Date: Wed, 28 Feb 2018 10:28:06 +0100 Subject: typo --- Zotlabs/Update/_1206.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1206.php b/Zotlabs/Update/_1206.php index bb2000aad..351d53ff6 100644 --- a/Zotlabs/Update/_1206.php +++ b/Zotlabs/Update/_1206.php @@ -8,7 +8,7 @@ class _1206 { if(ACTIVE_DBTYPE == DBTYPE_MYSQL) { $r = q("ALTER TABLE item - ADD INDEX uid_resource_type (uid, resource_type), + ADD INDEX uid_resource_type (uid, resource_type) "); if($r) -- cgit v1.2.3 From 6ee6285670be27bbcf8565dd63af57a93673972b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 2 Mar 2018 10:10:29 +0100 Subject: db update to drop index resource_type. we have uid_resource_type now. --- Zotlabs/Update/_1207.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Zotlabs/Update/_1207.php (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1207.php b/Zotlabs/Update/_1207.php new file mode 100644 index 000000000..f53bc46ae --- /dev/null +++ b/Zotlabs/Update/_1207.php @@ -0,0 +1,24 @@ + Date: Fri, 2 Mar 2018 11:38:21 +0100 Subject: update DB update 1205 to mitigate ERROR 1069 (42000): Too many keys specified; max 64 keys allowed --- Zotlabs/Update/_1205.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1205.php b/Zotlabs/Update/_1205.php index 5384f183e..968833726 100644 --- a/Zotlabs/Update/_1205.php +++ b/Zotlabs/Update/_1205.php @@ -7,6 +7,17 @@ class _1205 { function run() { if(ACTIVE_DBTYPE == DBTYPE_MYSQL) { + + q("ALTER TABLE item DROP INDEX title"); + q("ALTER TABLE item DROP INDEX body"); + q("ALTER TABLE item DROP INDEX allow_cid"); + q("ALTER TABLE item DROP INDEX allow_gid"); + q("ALTER TABLE item DROP INDEX deny_cid"); + q("ALTER TABLE item DROP INDEX deny_gid"); + q("ALTER TABLE item DROP INDEX item_flags"); + q("ALTER TABLE item DROP INDEX item_restrict"); + q("ALTER TABLE item DROP INDEX aid"); + $r = q("ALTER TABLE item DROP INDEX item_private, ADD INDEX uid_item_private (uid, item_private), -- cgit v1.2.3 From f0f58dade886d88fc178b78c04e1a4067ddfda04 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 6 Mar 2018 15:31:45 -0800 Subject: federated polls: add poll_author which will be necessary for Diaspora federation --- Zotlabs/Update/_1208.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Zotlabs/Update/_1208.php (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1208.php b/Zotlabs/Update/_1208.php new file mode 100644 index 000000000..4cbcf4322 --- /dev/null +++ b/Zotlabs/Update/_1208.php @@ -0,0 +1,26 @@ + Date: Wed, 7 Mar 2018 15:39:14 -0800 Subject: federated polls: GNU-Social requires us to preserve the original order of the poll answers for use in making a vote, unlike diaspora (which selects by guid) and activitypub (which selects by non-localisable text). --- Zotlabs/Update/_1209.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Zotlabs/Update/_1209.php (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1209.php b/Zotlabs/Update/_1209.php new file mode 100644 index 000000000..5ec449395 --- /dev/null +++ b/Zotlabs/Update/_1209.php @@ -0,0 +1,26 @@ + Date: Thu, 8 Mar 2018 10:20:40 +0100 Subject: fix syntax error in postgres update --- Zotlabs/Update/_1204.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Update') diff --git a/Zotlabs/Update/_1204.php b/Zotlabs/Update/_1204.php index 93c2e4e3f..0b9204b9b 100644 --- a/Zotlabs/Update/_1204.php +++ b/Zotlabs/Update/_1204.php @@ -8,11 +8,11 @@ class _1204 { if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) { $r1 = q("ALTER TABLE poll ADD poll_guid text NOT NULL"); - $r2 = q("create index \"poll_guid_idx\" on poll \"poll_guid\""); + $r2 = q("create index \"poll_guid_idx\" on poll (\"poll_guid\")"); $r3 = q("ALTER TABLE poll_elm ADD pelm_guid text NOT NULL"); - $r4 = q("create index \"pelm_guid_idx\" on poll_elm \"pelm_guid\""); + $r4 = q("create index \"pelm_guid_idx\" on poll_elm (\"pelm_guid\")"); $r5 = q("ALTER TABLE vote ADD vote_guid text NOT NULL"); - $r6 = q("create index \"vote_guid_idx\" on vote \"vote_guid\""); + $r6 = q("create index \"vote_guid_idx\" on vote (\"vote_guid\")"); $r = ($r1 && $r2 && $r3 && $r4 && $r5 && $r6); } -- cgit v1.2.3