Inital backend support to pinned notes

This commit is contained in:
Matias De lellis
2020-06-04 13:39:58 -03:00
parent 0845127458
commit c70c87a20d
10 changed files with 126 additions and 124 deletions

View File

@@ -0,0 +1,35 @@
<?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;
}
}