<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
{
// Needed for the helper function to read from the legacy term table
const OBJECT_TYPE_POST = 1;
- const VERSION = 1384;
+ const VERSION = 1400;
/**
* Calls the post update functions
return true;
}
+ if (!DBStructure::existsTable('item')) {
+ DI::config()->set("system", "post_update_version", 1400);
+ return true;
+ }
+
$condition = ["`extid` != ? AND EXISTS(SELECT `id` FROM `post-user` WHERE `uri-id` = `item`.`uri-id` AND `uid` = `item`.`uid` AND `external-id` IS NULL)", ''];
Logger::info('Start', ['rest' => DBA::count('item', $condition)]);
Logger::info('Processed', ['rows' => $rows]);
if ($rows <= 100) {
- DI::config()->set("system", "post_update_version", 1384);
+ DI::config()->set("system", "post_update_version", 1400);
Logger::info('Done');
return true;
}