db update to get rid of bogus activitypub xchans which got created due to a bug in the pubcrawl addon

This commit is contained in:
Mario Vavti 2018-08-29 13:57:36 +02:00
parent 74d80473df
commit 42093aedcf
2 changed files with 27 additions and 1 deletions

26
Zotlabs/Update/_1219.php Normal file
View File

@ -0,0 +1,26 @@
<?php
namespace Zotlabs\Update;
class _1219 {
function run() {
q("START TRANSACTION");
$r = q("DELETE FROM xchan WHERE
xchan_hash like '%s' AND
xchan_network = 'activitypub'",
dbesc(z_root()) . '%'
);
if($r) {
q("COMMIT");
return UPDATE_SUCCESS;
}
else {
q("ROLLBACK");
return UPDATE_FAILED;
}
}
}

View File

@ -54,7 +54,7 @@ define ( 'STD_VERSION', '3.7.1' );
define ( 'ZOT_REVISION', '6.0a' );
define ( 'DB_UPDATE_VERSION', 1218 );
define ( 'DB_UPDATE_VERSION', 1219 );
define ( 'PROJECT_BASE', __DIR__ );