Files
deck/lib/Migration/Version010400Date20210305.php
Jakob Röhrl abd0deefab show the images
Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
2021-12-17 12:59:55 +01:00

28 lines
678 B
PHP

<?php
declare(strict_types=1);
namespace OCA\Deck\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version010400Date20210305 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
// Add cover image database field
$table = $schema->getTable('deck_boards');
if (!$table->hasColumn('cover_images')) {
$table->addColumn('cover_images', 'boolean', [
'notnull' => false,
'default' => true,
]);
return $schema;
}
return null;
}
}