cloud_bbb/lib/Migration/Version000000Date2021012216...

42 lines
900 B
PHP
Raw Normal View History

2021-01-22 19:12:55 +01: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 Version000000Date20210122164501 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('moderator_token')) {
$table->addColumn('moderator_token', 'string', [
'notnull' => false,
'length' => 64
2021-01-22 19:12:55 +01:00
]);
}
return $schema;
}
return null;
}
}