2018-07-10 10:01:17 +00:00
|
|
|
<?php
|
2019-12-03 18:57:53 +00:00
|
|
|
|
2018-07-10 10:01:17 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
/**
|
2024-05-24 17:43:47 +00:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2018-07-10 10:01:17 +00:00
|
|
|
*/
|
|
|
|
namespace OC\Core\Migrations;
|
|
|
|
|
|
|
|
use OCP\DB\ISchemaWrapper;
|
2021-01-12 09:20:12 +00:00
|
|
|
use OCP\DB\Types;
|
2018-07-10 10:01:17 +00:00
|
|
|
use OCP\Migration\IOutput;
|
2019-11-22 19:52:10 +00:00
|
|
|
use OCP\Migration\SimpleMigrationStep;
|
2018-07-10 10:01:17 +00:00
|
|
|
|
|
|
|
class Version14000Date20180710092004 extends SimpleMigrationStep {
|
|
|
|
public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
|
|
|
|
/** @var ISchemaWrapper $schema */
|
|
|
|
$schema = $schemaClosure();
|
|
|
|
|
|
|
|
$table = $schema->getTable('share');
|
|
|
|
|
|
|
|
if (!$table->hasColumn('password_by_talk')) {
|
2020-06-30 20:12:06 +00:00
|
|
|
$table->addColumn('password_by_talk', Types::BOOLEAN, [
|
2018-07-10 10:01:17 +00:00
|
|
|
'default' => 0,
|
2020-11-09 09:38:47 +00:00
|
|
|
'notnull' => false,
|
2018-07-10 10:01:17 +00:00
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
return $schema;
|
|
|
|
}
|
|
|
|
}
|