@@ -9,19 +9,20 @@ use OCP\DB\ISchemaWrapper;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\SimpleMigrationStep;
|
||||
|
||||
class Version10400Date20210305 extends 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('coverImages')) {
|
||||
$table->addColumn('coverImages', 'boolean', [
|
||||
if (!$table->hasColumn('cover_images')) {
|
||||
$table->addColumn('cover_images', 'boolean', [
|
||||
'notnull' => false,
|
||||
'default' => true,
|
||||
]);
|
||||
return $schema;
|
||||
}
|
||||
return $schema;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user