cover images

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2021-03-05 14:47:43 +01:00
parent a857c63b35
commit d4898552ad
7 changed files with 65 additions and 5 deletions

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace OCA\Deck\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version10400Date20210305 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('coverImages')) {
$table->addColumn('coverImages', 'boolean', [
'notnull' => false,
'default' => true,
]);
}
return $schema;
}
}