diff options
Diffstat (limited to 'lib/public/Migration')
19 files changed, 730 insertions, 106 deletions
diff --git a/lib/public/Migration/Attributes/AddColumn.php b/lib/public/Migration/Attributes/AddColumn.php new file mode 100644 index 00000000000..d84a0c1f60c --- /dev/null +++ b/lib/public/Migration/Attributes/AddColumn.php @@ -0,0 +1,30 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use Attribute; + +/** + * attribute on new column creation + * + * @since 30.0.0 + */ +#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)] +class AddColumn extends ColumnMigrationAttribute { + /** + * @return string + * @since 30.0.0 + */ + public function definition(): string { + $type = is_null($this->getType()) ? '' : ' (' . $this->getType()->value . ')'; + return empty($this->getName()) + ? 'Addition of a new column' . $type . ' to table \'' . $this->getTable() . '\'' + : 'Addition of column \'' . $this->getName() . '\'' . $type . ' to table \'' . $this->getTable() . '\''; + } +} diff --git a/lib/public/Migration/Attributes/AddIndex.php b/lib/public/Migration/Attributes/AddIndex.php new file mode 100644 index 00000000000..ee22fe7f128 --- /dev/null +++ b/lib/public/Migration/Attributes/AddIndex.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use Attribute; + +/** + * attribute on index creation + * + * @since 30.0.0 + */ +#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)] +class AddIndex extends IndexMigrationAttribute { + /** + * @return string + * @since 30.0.0 + */ + public function definition(): string { + $type = is_null($this->getType()) ? '' : ' (' . $this->getType()->value . ')'; + return 'Addition of a new index' . $type . ' to table \'' . $this->getTable() . '\''; + } +} diff --git a/lib/public/Migration/Attributes/ColumnMigrationAttribute.php b/lib/public/Migration/Attributes/ColumnMigrationAttribute.php new file mode 100644 index 00000000000..30b6fe008e6 --- /dev/null +++ b/lib/public/Migration/Attributes/ColumnMigrationAttribute.php @@ -0,0 +1,101 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use JsonSerializable; + +/** + * generic class related to migration attribute about column changes + * + * @since 30.0.0 + */ +class ColumnMigrationAttribute extends MigrationAttribute implements JsonSerializable { + /** + * @param string $table name of the database table + * @param string $name name of the column + * @param ColumnType|null $type type of the column + * @param string $description description of the migration + * @param array $notes notes about the migration/column + * @since 30.0.0 + */ + public function __construct( + string $table, + private string $name = '', + private ?ColumnType $type = null, + string $description = '', + array $notes = [], + ) { + parent::__construct($table, $description, $notes); + } + + /** + * @param string $name + * + * @return $this + * @since 30.0.0 + */ + public function setName(string $name): self { + $this->name = $name; + return $this; + } + + /** + * @return string + * @since 30.0.0 + */ + public function getName(): string { + return $this->name; + } + + /** + * @param ColumnType|null $type + * + * @return $this + * @since 30.0.0 + */ + public function setType(?ColumnType $type): self { + $this->type = $type; + return $this; + } + + /** + * @return ColumnType|null + * @since 30.0.0 + */ + public function getType(): ?ColumnType { + return $this->type; + } + + /** + * @param array $data + * + * @return $this + * @since 30.0.0 + */ + public function import(array $data): self { + parent::import($data); + $this->setName($data['name'] ?? ''); + $this->setType(ColumnType::tryFrom($data['type'] ?? '')); + return $this; + } + + /** + * @return array + * @since 30.0.0 + */ + public function jsonSerialize(): array { + return array_merge( + parent::jsonSerialize(), + [ + 'name' => $this->getName(), + 'type' => $this->getType() ?? '', + ] + ); + } +} diff --git a/lib/public/Migration/Attributes/ColumnType.php b/lib/public/Migration/Attributes/ColumnType.php new file mode 100644 index 00000000000..ab6044e3ae2 --- /dev/null +++ b/lib/public/Migration/Attributes/ColumnType.php @@ -0,0 +1,60 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +/** + * enum ColumnType based on OCP\DB\Types + * + * @see \OCP\DB\Types + * @since 30.0.0 + */ +enum ColumnType : string { + /** @since 30.0.0 */ + case BIGINT = 'bigint'; + /** @since 30.0.0 */ + case BINARY = 'binary'; + /** @since 30.0.0 */ + case BLOB = 'blob'; + /** @since 30.0.0 */ + case BOOLEAN = 'boolean'; + /** + * A column created with `DATE` can be used for both `DATE` and `DATE_IMMUTABLE` + * on the `\OCP\AppFramework\Db\Entity`. + * @since 30.0.0 + */ + case DATE = 'date'; + /** + * A column created with `DATETIME` can be used for both `DATETIME` and `DATETIME_IMMUTABLE` + * on the `\OCP\AppFramework\Db\Entity`. + * @since 30.0.0 + */ + case DATETIME = 'datetime'; + /** + * A column created with `DATETIME_TZ` can be used for both `DATETIME_TZ` and `DATETIME_TZ_IMMUTABLE` + * on the `\OCP\AppFramework\Db\Entity`. + * @since 31.0.0 + */ + case DATETIME_TZ = 'datetimetz'; + /** @since 30.0.0 */ + case DECIMAL = 'decimal'; + /** @since 30.0.0 */ + case FLOAT = 'float'; + /** @since 30.0.0 */ + case INTEGER = 'integer'; + /** @since 30.0.0 */ + case SMALLINT = 'smallint'; + /** @since 30.0.0 */ + case STRING = 'string'; + /** @since 30.0.0 */ + case TEXT = 'text'; + /** @since 30.0.0 */ + case TIME = 'time'; + /** @since 30.0.0 */ + case JSON = 'json'; +} diff --git a/lib/public/Migration/Attributes/CreateTable.php b/lib/public/Migration/Attributes/CreateTable.php new file mode 100644 index 00000000000..df0418fa4bc --- /dev/null +++ b/lib/public/Migration/Attributes/CreateTable.php @@ -0,0 +1,29 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use Attribute; + +/** + * attribute on table creation + * + * @since 30.0.0 + */ +#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)] +class CreateTable extends TableMigrationAttribute { + /** + * @return string + * @since 30.0.0 + */ + public function definition(): string { + $definition = 'Creation of new table \'' . $this->getTable() . '\''; + $definition .= empty($this->getColumns()) ? '' : ' with columns ' . implode(', ', $this->getColumns()); + return $definition; + } +} diff --git a/lib/public/Migration/Attributes/DropColumn.php b/lib/public/Migration/Attributes/DropColumn.php new file mode 100644 index 00000000000..a1cd5790cc7 --- /dev/null +++ b/lib/public/Migration/Attributes/DropColumn.php @@ -0,0 +1,29 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use Attribute; + +/** + * attribute on column drop + * + * @since 30.0.0 + */ +#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)] +class DropColumn extends ColumnMigrationAttribute { + /** + * @return string + * @since 30.0.0 + */ + public function definition(): string { + return empty($this->getName()) + ? 'Deletion of a column from table \'' . $this->getTable() . '\'' + : 'Deletion of column \'' . $this->getName() . '\' from table \'' . $this->getTable() . '\''; + } +} diff --git a/lib/public/Migration/Attributes/DropIndex.php b/lib/public/Migration/Attributes/DropIndex.php new file mode 100644 index 00000000000..2702cbed9a7 --- /dev/null +++ b/lib/public/Migration/Attributes/DropIndex.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use Attribute; + +/** + * attribute on index drop + * + * @since 30.0.0 + */ +#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)] +class DropIndex extends IndexMigrationAttribute { + /** + * @return string + * @since 30.0.0 + */ + public function definition(): string { + return 'Deletion of an index from table \'' . $this->getTable() . '\''; + } +} diff --git a/lib/public/Migration/Attributes/DropTable.php b/lib/public/Migration/Attributes/DropTable.php new file mode 100644 index 00000000000..e90e4804a3c --- /dev/null +++ b/lib/public/Migration/Attributes/DropTable.php @@ -0,0 +1,27 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use Attribute; + +/** + * attribute on table drop + * + * @since 30.0.0 + */ +#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)] +class DropTable extends TableMigrationAttribute { + /** + * @return string + * @since 30.0.0 + */ + public function definition(): string { + return 'Deletion of table \'' . $this->getTable() . '\''; + } +} diff --git a/lib/public/Migration/Attributes/GenericMigrationAttribute.php b/lib/public/Migration/Attributes/GenericMigrationAttribute.php new file mode 100644 index 00000000000..e63f78088e8 --- /dev/null +++ b/lib/public/Migration/Attributes/GenericMigrationAttribute.php @@ -0,0 +1,49 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use JsonSerializable; + +/** + * generic entry, used to replace migration attribute not yet known in current version + * but used in a future release + * + * @since 30.0.0 + */ +class GenericMigrationAttribute extends MigrationAttribute implements JsonSerializable { + /** + * @param array $details + * @since 30.0.0 + */ + public function __construct( + private readonly array $details = [], + ) { + parent::__construct( + $details['table'] ?? '', + $details['description'] ?? '', + $details['notes'] ?? [] + ); + } + + /** + * @return string + * @since 30.0.0 + */ + public function definition(): string { + return json_encode($this->jsonSerialize(), JSON_UNESCAPED_SLASHES); + } + + /** + * @return array + * @since 30.0.0 + */ + public function jsonSerialize(): array { + return $this->details; + } +} diff --git a/lib/public/Migration/Attributes/IndexMigrationAttribute.php b/lib/public/Migration/Attributes/IndexMigrationAttribute.php new file mode 100644 index 00000000000..88b60a564b3 --- /dev/null +++ b/lib/public/Migration/Attributes/IndexMigrationAttribute.php @@ -0,0 +1,78 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use JsonSerializable; + +/** + * generic class related to migration attribute about index changes + * + * @since 30.0.0 + */ +class IndexMigrationAttribute extends MigrationAttribute implements JsonSerializable { + /** + * @param string $table name of the database table + * @param IndexType|null $type type of the index + * @param string $description description of the migration + * @param array $notes notes abour the migration/index + * @since 30.0.0 + */ + public function __construct( + string $table, + private ?IndexType $type = null, + string $description = '', + array $notes = [], + ) { + parent::__construct($table, $description, $notes); + } + + /** + * @param IndexType|null $type + * + * @return $this + * @since 30.0.0 + */ + public function setType(?IndexType $type): self { + $this->type = $type; + return $this; + } + + /** + * @return IndexType|null + * @since 30.0.0 + */ + public function getType(): ?IndexType { + return $this->type; + } + + /** + * @param array $data + * + * @return $this + * @since 30.0.0 + */ + public function import(array $data): self { + parent::import($data); + $this->setType(IndexType::tryFrom($data['type'] ?? '')); + return $this; + } + + /** + * @return array + * @since 30.0.0 + */ + public function jsonSerialize(): array { + return array_merge( + parent::jsonSerialize(), + [ + 'type' => $this->getType() ?? '', + ] + ); + } +} diff --git a/lib/public/Migration/Attributes/IndexType.php b/lib/public/Migration/Attributes/IndexType.php new file mode 100644 index 00000000000..45c88d81041 --- /dev/null +++ b/lib/public/Migration/Attributes/IndexType.php @@ -0,0 +1,23 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +/** + * type of index + * + * @since 30.0.0 + */ +enum IndexType : string { + /** @since 30.0.0 */ + case PRIMARY = 'primary'; + /** @since 30.0.0 */ + case INDEX = 'index'; + /** @since 30.0.0 */ + case UNIQUE = 'unique'; +} diff --git a/lib/public/Migration/Attributes/MigrationAttribute.php b/lib/public/Migration/Attributes/MigrationAttribute.php new file mode 100644 index 00000000000..d5b2d52cafb --- /dev/null +++ b/lib/public/Migration/Attributes/MigrationAttribute.php @@ -0,0 +1,118 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use JsonSerializable; + +/** + * @since 30.0.0 + */ +class MigrationAttribute implements JsonSerializable { + /** + * @param string $table name of the database table + * @param string $description description of the migration + * @param array $notes notes about the migration + * @since 30.0.0 + */ + public function __construct( + private string $table, + private string $description = '', + private array $notes = [], + ) { + } + + /** + * @param string $table + * + * @return $this + * @since 30.0.0 + */ + public function setTable(string $table): self { + $this->table = $table; + return $this; + } + + /** + * @return string + * @since 30.0.0 + */ + public function getTable(): string { + return $this->table; + } + + /** + * @param string $description + * + * @return $this + * @since 30.0.0 + */ + public function setDescription(string $description): self { + $this->description = $description; + return $this; + } + + /** + * @return string + * @since 30.0.0 + */ + public function getDescription(): string { + return $this->description; + } + + /** + * @param array $notes + * + * @return $this + * @since 30.0.0 + */ + public function setNotes(array $notes): self { + $this->notes = $notes; + return $this; + } + + /** + * @return array + * @since 30.0.0 + */ + public function getNotes(): array { + return $this->notes; + } + + /** + * @return string + * @since 30.0.0 + */ + public function definition(): string { + return json_encode($this->jsonSerialize(), JSON_UNESCAPED_SLASHES); + } + + /** + * @param array $data + * + * @return self + * @since 30.0.0 + */ + public function import(array $data): self { + return $this->setDescription($data['description'] ?? '') + ->setNotes($data['notes'] ?? []); + } + + /** + * @return array + * @since 30.0.0 + */ + public function jsonSerialize(): array { + return [ + 'class' => get_class($this), + 'table' => $this->getTable(), + 'description' => $this->getDescription(), + 'notes' => $this->getNotes() + ]; + } +} diff --git a/lib/public/Migration/Attributes/ModifyColumn.php b/lib/public/Migration/Attributes/ModifyColumn.php new file mode 100644 index 00000000000..6fc44ebb824 --- /dev/null +++ b/lib/public/Migration/Attributes/ModifyColumn.php @@ -0,0 +1,30 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use Attribute; + +/** + * attribute on column modification + * + * @since 30.0.0 + */ +#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)] +class ModifyColumn extends ColumnMigrationAttribute { + /** + * @return string + * @since 30.0.0 + */ + public function definition(): string { + $type = is_null($this->getType()) ? '' : ' to ' . $this->getType()->value; + return empty($this->getName()) + ? 'Modification of a column from table \'' . $this->getTable() . '\'' . $type + : 'Modification of column \'' . $this->getName() . '\' from table \'' . $this->getTable() . '\'' . $type; + } +} diff --git a/lib/public/Migration/Attributes/TableMigrationAttribute.php b/lib/public/Migration/Attributes/TableMigrationAttribute.php new file mode 100644 index 00000000000..0776e50387e --- /dev/null +++ b/lib/public/Migration/Attributes/TableMigrationAttribute.php @@ -0,0 +1,78 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +namespace OCP\Migration\Attributes; + +use JsonSerializable; + +/** + * generic class related to migration attribute about table changes + * + * @since 30.0.0 + */ +class TableMigrationAttribute extends MigrationAttribute implements JsonSerializable { + /** + * @param string $table name of the database table + * @param array $columns list of columns + * @param string $description description of the migration + * @param array $notes notes about the migration/table + * @since 30.0.0 + */ + public function __construct( + string $table, + private array $columns = [], + string $description = '', + array $notes = [], + ) { + parent::__construct($table, $description, $notes); + } + + /** + * @param array $columns + * + * @return $this + * @since 30.0.0 + */ + public function setColumns(array $columns): self { + $this->columns = $columns; + return $this; + } + + /** + * @return array + * @since 30.0.0 + */ + public function getColumns(): array { + return $this->columns; + } + + /** + * @param array $data + * + * @return $this + * @since 30.0.0 + */ + public function import(array $data): self { + parent::import($data); + $this->setColumns($data['columns'] ?? []); + return $this; + } + + /** + * @return array + * @since 30.0.0 + */ + public function jsonSerialize(): array { + return array_merge( + parent::jsonSerialize(), + [ + 'columns' => $this->getColumns(), + ] + ); + } +} diff --git a/lib/public/Migration/BigIntMigration.php b/lib/public/Migration/BigIntMigration.php index a9782f1f264..0fa7e559f79 100644 --- a/lib/public/Migration/BigIntMigration.php +++ b/lib/public/Migration/BigIntMigration.php @@ -1,25 +1,8 @@ <?php + /** - * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com> - * - * @author Daniel Kesselberg <mail@danielkesselberg.de> - * @author Joas Schilling <coding@schilljs.com> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Migration; @@ -33,7 +16,7 @@ use OCP\DB\ISchemaWrapper; abstract class BigIntMigration extends SimpleMigrationStep { /** * @return array Returns an array with the following structure - * ['table1' => ['column1', 'column2'], ...] + * ['table1' => ['column1', 'column2'], ...] * @since 13.0.0 */ abstract protected function getColumnsByTable(); diff --git a/lib/public/Migration/IMigrationStep.php b/lib/public/Migration/IMigrationStep.php index da9f62e861e..d738fee8e8d 100644 --- a/lib/public/Migration/IMigrationStep.php +++ b/lib/public/Migration/IMigrationStep.php @@ -1,29 +1,9 @@ <?php declare(strict_types=1); - /** - * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com> - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Joas Schilling <coding@schilljs.com> - * @author Robin Appelman <robin@icewind.nl> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Migration; diff --git a/lib/public/Migration/IOutput.php b/lib/public/Migration/IOutput.php index 70fb56b6bdd..60e870055fe 100644 --- a/lib/public/Migration/IOutput.php +++ b/lib/public/Migration/IOutput.php @@ -1,25 +1,9 @@ <?php + /** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only */ namespace OCP\Migration; @@ -32,6 +16,13 @@ interface IOutput { /** * @param string $message * @return void + * @since 28.0.0 + */ + public function debug(string $message): void; + + /** + * @param string $message + * @return void * @since 9.1.0 */ public function info($message); diff --git a/lib/public/Migration/IRepairStep.php b/lib/public/Migration/IRepairStep.php index ec899c945f8..33f07d4723a 100644 --- a/lib/public/Migration/IRepairStep.php +++ b/lib/public/Migration/IRepairStep.php @@ -1,25 +1,9 @@ <?php + /** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * + * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-FileCopyrightText: 2016 ownCloud, Inc. + * SPDX-License-Identifier: AGPL-3.0-only */ namespace OCP\Migration; diff --git a/lib/public/Migration/SimpleMigrationStep.php b/lib/public/Migration/SimpleMigrationStep.php index ee657cda470..6119d533530 100644 --- a/lib/public/Migration/SimpleMigrationStep.php +++ b/lib/public/Migration/SimpleMigrationStep.php @@ -1,30 +1,9 @@ <?php declare(strict_types=1); - /** - * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com> - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author Joas Schilling <coding@schilljs.com> - * @author Robin Appelman <robin@icewind.nl> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @license GNU AGPL version 3 or any later version - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * + * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace OCP\Migration; |