spreed/lib/Migration/Version21001Date20250328123156.php
Joas Schilling 7c8e3bc5aa
feat(conversations): Add "Important conversations" which still notify during DND
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-04-16 13:23:15 +02:00

41 lines
941 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Talk\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version21001Date20250328123156 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure
* @param array $options
* @return null|ISchemaWrapper
*/
#[\Override]
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$table = $schema->getTable('talk_attendees');
if (!$table->hasColumn('important')) {
$table->addColumn('important', Types::BOOLEAN, [
'default' => 0,
'notnull' => false,
]);
}
return $schema;
}
}