0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-06 15:01:04 +00:00
nextcloud_server/core/Migrations/Version25000Date20220515204012.php
Ferdinand Thiessen 832f79ac93
chore: apply code style
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-04-30 19:04:59 +02:00

38 lines
800 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2019 ownCloud GmbH
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OC\Core\Migrations;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version25000Date20220515204012 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if ($schema->hasTable('share')) {
$shareTable = $schema->getTable('share');
if (!$shareTable->hasColumn('attributes')) {
$shareTable->addColumn(
'attributes',
Types::JSON,
[
'default' => null,
'notnull' => false
]
);
}
}
return $schema;
}
}