Browse Source
feat(talk_rooms): Add mention_permissions column
Signed-off-by: Sanskar Soni <sanskarsoni300@gmail.com>
pull/12618/head
Sanskar Soni
1 year ago
committed by
Joas Schilling
No known key found for this signature in database
GPG Key ID: C400AAF20C1BB6FC
2 changed files with
41 additions and
1 deletions
appinfo/info.xml
lib/Migration/Version20000Date20240623123938.php
@ -18,7 +18,7 @@
* 🌉 **Sync with other chat solutions** With [Matterbridge](https://github.com/42wim/matterbridge/) being integrated in Talk, you can easily sync a lot of other chat solutions to Nextcloud Talk and vice-versa.
]]></description>
<version > 20.0.0-dev.6 </version>
<version > 20.0.0-dev.7 </version>
<licence > agpl</licence>
<author > Daniel Calviño Sánchez</author>
@ -0,0 +1,40 @@
< ? php
declare ( strict_types = 1 );
/**
* SPDX - FileCopyrightText : 2024 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 Version20000Date20240623123938 extends SimpleMigrationStep {
/**
* @ param IOutput $output
* @ param Closure () : ISchemaWrapper $schemaClosure
* @ param array $options
* @ return null | ISchemaWrapper
*/
public function changeSchema ( IOutput $output , Closure $schemaClosure , array $options ) : ? ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure ();
$table = $schema -> getTable ( 'talk_rooms' );
if ( ! $table -> hasColumn ( 'mention_permissions' )) {
$table -> addColumn ( 'mention_permissions' , Types :: INTEGER , [
'default' => 0 ,
'notnull' => true ,
]);
}
return $schema ;
}
}