2019-04-28 11:10:55 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2019-04-28 11:10:55 -04:00
|
|
|
declare(strict_types=1);
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2019-04-28 11:10:55 -04:00
|
|
|
/**
|
2024-05-24 13:43:47 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-04-28 11:10:55 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Core\Migrations;
|
|
|
|
|
|
|
|
|
|
use Closure;
|
|
|
|
|
use OCP\DB\ISchemaWrapper;
|
2021-01-12 04:20:12 -05:00
|
|
|
use OCP\DB\Types;
|
2019-04-28 11:10:55 -04:00
|
|
|
use OCP\Migration\IOutput;
|
2019-11-22 14:52:10 -05:00
|
|
|
use OCP\Migration\SimpleMigrationStep;
|
2019-04-28 11:10:55 -04:00
|
|
|
|
|
|
|
|
class Version16000Date20190428150708 extends SimpleMigrationStep {
|
|
|
|
|
/**
|
|
|
|
|
* @param IOutput $output
|
|
|
|
|
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`
|
|
|
|
|
* @param array $options
|
|
|
|
|
* @return null|ISchemaWrapper
|
|
|
|
|
* @throws \Doctrine\DBAL\Schema\SchemaException
|
|
|
|
|
*/
|
|
|
|
|
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
|
|
|
|
|
/** @var ISchemaWrapper $schema */
|
|
|
|
|
$schema = $schemaClosure();
|
|
|
|
|
|
|
|
|
|
if ($schema->hasTable('collres_accesscache')) {
|
|
|
|
|
$table = $schema->getTable('collres_accesscache');
|
2020-06-30 16:12:06 -04:00
|
|
|
$table->addColumn('access', Types::BOOLEAN, [
|
2020-11-09 04:38:47 -05:00
|
|
|
'notnull' => false,
|
2019-04-28 11:10:55 -04:00
|
|
|
'default' => false
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $schema;
|
|
|
|
|
}
|
|
|
|
|
}
|