for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace OCA\Activity\Migration;
use Doctrine\DBAL\Schema\Schema;
use OCP\Migration\SimpleMigrationStep;
use OCP\Migration\IOutput;
class Version2006000Date20170808155040 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param \Closure $schemaClosure The `\Closure` returns a `Schema`
* @param array $options
* @since 13.0.0
*/
public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
}
* @return null|Schema
* @throws \Doctrine\DBAL\Schema\SchemaException
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
/** @var Schema $schema */
$schema = $schemaClosure();
$table = $schema->getTable('activity');
$table->dropIndex('activity_filter_app');
$table->addIndex(['affecteduser', 'type', 'app', 'timestamp'], 'activity_filter');
return $schema;
public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {