2020-08-29 14:37:50 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace OCA\BigBlueButton\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 Version000000Date20200829112301 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) {
|
|
|
|
$schema = $schemaClosure();
|
|
|
|
|
|
|
|
if ($schema->hasTable('bbb_rooms')) {
|
|
|
|
$table = $schema->getTable('bbb_rooms');
|
|
|
|
|
|
|
|
if (!$table->hasColumn('require_moderator')) {
|
|
|
|
$table->addColumn('require_moderator', 'boolean', [
|
2021-07-26 15:54:54 +02:00
|
|
|
'notnull' => false,
|
2020-08-29 14:37:50 +02:00
|
|
|
'default' => false,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $schema;
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|