Files
quicknotes/lib/Migration/Version000205Date20200604122312.php
2020-06-04 13:39:58 -03:00

36 lines
813 B
PHP

<?php
declare(strict_types=1);
namespace OCA\QuickNotes\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
/**
* Auto-generated migration step: Please modify to your needs!
*/
class Version000205Date20200604122312 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
* @param array $options
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable('quicknotes_notes');
$table->addColumn('pinned', 'boolean', [
'notnull' => true,
'default' => false,
]);
return $schema;
}
}