aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-06-27 13:45:06 +0000
committerMario <mario@mariovavti.com>2021-06-27 13:45:06 +0000
commitb3b842c0713aef18274fd7ecb95551a4d22d1763 (patch)
treeb29a3b63b7bd5fe9a340a56176d9be78debef24a
parentaca8d1b8f995cf2a4cbbdbb88f7eaebf08967e30 (diff)
downloadvolse-hubzilla-b3b842c0713aef18274fd7ecb95551a4d22d1763.tar.gz
volse-hubzilla-b3b842c0713aef18274fd7ecb95551a4d22d1763.tar.bz2
volse-hubzilla-b3b842c0713aef18274fd7ecb95551a4d22d1763.zip
update 1246 to flag legacy zot hublocs and xchans deleted. we will set the deleted flag to 2 so we can distinguish them from real deletes if necessary
-rw-r--r--Zotlabs/Update/_1246.php24
-rw-r--r--boot.php2
2 files changed, 25 insertions, 1 deletions
diff --git a/Zotlabs/Update/_1246.php b/Zotlabs/Update/_1246.php
new file mode 100644
index 000000000..3023c45dd
--- /dev/null
+++ b/Zotlabs/Update/_1246.php
@@ -0,0 +1,24 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1246 {
+
+ function run() {
+
+ q("START TRANSACTION");
+
+ $r1 = dbq("UPDATE xchan SET xchan_deleted = 2 WHERE xchan_network = 'zot' AND xchan_deleted = 0");
+ $r2 = dbq("UPDATE hubloc SET hubloc_deleted = 2 WHERE hubloc_network = 'zot' AND hubloc_deleted = 0");
+
+ if($r1 && $r2) {
+ q("COMMIT");
+ return UPDATE_SUCCESS;
+ }
+
+ q("ROLLBACK");
+ return UPDATE_FAILED;
+
+ }
+
+}
diff --git a/boot.php b/boot.php
index 7e1df777a..5f79e5607 100644
--- a/boot.php
+++ b/boot.php
@@ -56,7 +56,7 @@ define ( 'PLATFORM_NAME', 'hubzilla' );
define ( 'STD_VERSION', '5.9.7' );
define ( 'ZOT_REVISION', '6.0' );
-define ( 'DB_UPDATE_VERSION', 1245 );
+define ( 'DB_UPDATE_VERSION', 1246 );
define ( 'PROJECT_BASE', __DIR__ );