for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace OCA\Analytics\Migration;
use Closure;
use OCP\DB\Exception;
use OCP\DB\ISchemaWrapper;
use OCP\IDBConnection;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
/**
* Auto-generated migration step: Please modify to your needs!
* sudo -u www-data php /var/www/nextcloud/occ migrations:execute analytics 4009Date20230517190000
*/
class Version4009Date20230517190000 extends SimpleMigrationStep
{
/** @var IDBConnection */
private $connection;
public function __construct(IDBConnection $connection)
$this->connection = $connection;
}
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @throws Exception
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options)
$query = $this->connection->getQueryBuilder();
$query->insert('analytics_whats_new')
->values([
'version' => $query->createNamedParameter('4.9.1'),
'data' => $query->createNamedParameter('{"changelogURL":"https:\/\/github.com\/rello\/analytics\/blob\/master\/CHANGELOG.md","whatsNew":{
"en":{"regular":["Column picker for data sources","Sharing of report groups","Smart picker integration"],"admin":["New Features apply to users"]},
"de":{"regular":["Spaltenauswahl für Datenquellen","Teilen von Berichtsgruppen","Smart Picker Integration"],"admin":["Nur User Features"]}
}}'),
])
->executeStatement();