mirror of
https://github.com/nextcloud/server.git
synced 2024-12-28 07:58:42 +00:00
5c49a54801
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
38 lines
799 B
PHP
38 lines
799 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;
|
|
}
|
|
}
|