db = $db; } /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param array $options * * @return void */ public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { } /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param array $options * * @return ISchemaWrapper */ public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); $table = $schema->getTable('bookmarks'); $table->addColumn('last_preview', 'integer', [ 'notnull' => false, 'length' => 4, 'default' => 0, 'unsigned' => true, ]); $table->addIndex(['last_preview']); return $schema; } /** * @param IOutput $output * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param array $options * * @return void */ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options) { } }