diff options
author | Joas Schilling <coding@schilljs.com> | 2020-04-07 17:27:36 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-05-12 11:40:19 +0300 |
commit | 6ddd276dd0bc8ef91cf1724363f3f33ec38fa8f0 (patch) | |
tree | 406e7410c1570acf80f93aece4b4a71b6631d617 /lib/Migration | |
parent | 6c3b4836c49aeab07cd7c84dc25c6756e1b4d2e3 (diff) |
Extend the signaling setting API to allow somewhat clustering
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Migration')
-rw-r--r-- | lib/Migration/Version8000Date20200407115318.php | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/Migration/Version8000Date20200407115318.php b/lib/Migration/Version8000Date20200407115318.php new file mode 100644 index 000000000..7764fd7c0 --- /dev/null +++ b/lib/Migration/Version8000Date20200407115318.php @@ -0,0 +1,39 @@ +<?php + +declare(strict_types=1); + +namespace OCA\Talk\Migration; + +use Closure; +use Doctrine\DBAL\Types\Type; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +/** + * Auto-generated migration step: Please modify to your needs! + */ +class Version8000Date20200407115318 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) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + $table = $schema->getTable('talk_rooms'); + if (!$table->hasColumn('assigned_hpb')) { + $table->addColumn('assigned_hpb', Type::INTEGER, [ + 'notnull' => false, + 'length' => 4, + 'unsigned' => false, + 'default' => null, + ]); + } + + return $schema; + } +} |