2019-04-28 17:10:55 +02:00
|
|
|
<?php
|
2019-12-03 19:57:53 +01:00
|
|
|
|
2019-04-28 17:10:55 +02:00
|
|
|
declare(strict_types=1);
|
2019-12-03 19:57:53 +01:00
|
|
|
|
2019-04-28 17:10:55 +02:00
|
|
|
/**
|
2024-05-24 19:43:47 +02:00
|
|
|
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2019-04-28 17:10:55 +02:00
|
|
|
*/
|
|
|
|
namespace OC\Core\Migrations;
|
|
|
|
|
|
|
|
use Closure;
|
|
|
|
use OCP\DB\ISchemaWrapper;
|
2021-01-12 10:20:12 +01:00
|
|
|
use OCP\DB\Types;
|
2019-04-28 17:10:55 +02:00
|
|
|
use OCP\Migration\IOutput;
|
2019-11-22 20:52:10 +01:00
|
|
|
use OCP\Migration\SimpleMigrationStep;
|
2019-04-28 17:10:55 +02: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 22:12:06 +02:00
|
|
|
$table->addColumn('access', Types::BOOLEAN, [
|
2020-11-09 10:38:47 +01:00
|
|
|
'notnull' => false,
|
2019-04-28 17:10:55 +02:00
|
|
|
'default' => false
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $schema;
|
|
|
|
}
|
|
|
|
}
|