diff options
Diffstat (limited to 'core/Migrations')
-rw-r--r-- | core/Migrations/Version240000Date20220202150027.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/core/Migrations/Version240000Date20220202150027.php b/core/Migrations/Version240000Date20220202150027.php new file mode 100644 index 00000000000..b13afa67d1e --- /dev/null +++ b/core/Migrations/Version240000Date20220202150027.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +namespace OC\Core\Migrations; + +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\DB\Types; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +/** + * Auto-generated migration step: Please modify to your needs! + */ +class Version240000Date20220202150027 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): ?ISchemaWrapper { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + $table = $schema->getTable('mounts'); + if (!$table->hasColumn('mount_provider_class')) { + $table->addColumn('mount_provider_class', Types::STRING, [ + 'notnull' => false, + 'length' => 128, + ]); + return $schema; + } + return null; + } +} |