aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Update')
-rw-r--r--Zotlabs/Update/_1256.php36
-rw-r--r--Zotlabs/Update/_1257.php33
-rw-r--r--Zotlabs/Update/_1258.php14
3 files changed, 83 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1256.php b/Zotlabs/Update/_1256.php
new file mode 100644
index 000000000..dd6ded225
--- /dev/null
+++ b/Zotlabs/Update/_1256.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1256 {
+
+ function run() {
+
+ dbq("START TRANSACTION");
+
+ $r1 = dbq("TRUNCATE TABLE updates");
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ $r2a = dbq("ALTER TABLE updates add ud_update numeric(1) NOT NULL DEFAULT '0'");
+ $r2b = dbq("CREATE INDEX ud_update ON updates (ud_update)");
+
+ $r2 = ($r2a && $r2b);
+ }
+
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+ $r2 = dbq("ALTER TABLE updates add ud_update tinyint(1) NOT NULL DEFAULT '0',
+ ADD INDEX (ud_update);"
+ );
+ }
+
+ if($r1 && $r2) {
+ dbq("COMMIT");
+ return UPDATE_SUCCESS;
+ }
+
+ q("ROLLBACK");
+ return UPDATE_FAILED;
+
+ }
+
+}
diff --git a/Zotlabs/Update/_1257.php b/Zotlabs/Update/_1257.php
new file mode 100644
index 000000000..34c10c372
--- /dev/null
+++ b/Zotlabs/Update/_1257.php
@@ -0,0 +1,33 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1257 {
+
+ function run() {
+
+ dbq("START TRANSACTION");
+
+ $r1 = dbq("TRUNCATE TABLE updates");
+
+ if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
+ $r2 = dbq("ALTER TABLE updates add ud_host text NOT NULL DEFAULT ''");
+ }
+
+ if(ACTIVE_DBTYPE == DBTYPE_MYSQL) {
+ $r2 = dbq("ALTER TABLE updates add ud_host varchar(191) NOT NULL DEFAULT ''");
+ }
+
+ $r3 = dbq("ALTER TABLE updates DROP COLUMN ud_guid");
+
+ if($r1 && $r2 && $r3) {
+ dbq("COMMIT");
+ return UPDATE_SUCCESS;
+ }
+
+ q("ROLLBACK");
+ return UPDATE_FAILED;
+
+ }
+
+}
diff --git a/Zotlabs/Update/_1258.php b/Zotlabs/Update/_1258.php
new file mode 100644
index 000000000..13812219e
--- /dev/null
+++ b/Zotlabs/Update/_1258.php
@@ -0,0 +1,14 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1258 {
+
+ function run() {
+
+ dbq("DELETE FROM pconfig WHERE cat = 'channelreputation'");
+ dbq("DELETE FROM iconfig WHERE cat = 'channelreputation'");
+
+ }
+
+}