<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
Logger::info('Start', ['rest' => DBA::count('photo', $condition)]);
$rows = 0;
- $photos = DBA::select('photo', [], $condition, ['limit' => 10000]);
+ $photos = DBA::select('photo', [], $condition, ['limit' => 100]);
if (DBA::errorNo() != 0) {
Logger::error('Database error', ['no' => DBA::errorNo(), 'message' => DBA::errorMessage()]);
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)]);