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\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 030201Date20210129200000
*/
class Version030201Date20210129200000 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
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options)
* @return null|ISchemaWrapper
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options)
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable('analytics_dataset');
$table->getColumn('link')->setLength(500);
return $schema;
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options)