mirror of
https://github.com/nextcloud/server.git
synced 2026-02-11 23:04:22 -05:00
Signed-off-by: Maxence Lange <maxence@artificial-owl.com> d Signed-off-by: Maxence Lange <maxence@artificial-owl.com> f Signed-off-by: Maxence Lange <maxence@artificial-owl.com> d Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
22 lines
702 B
PHP
22 lines
702 B
PHP
<?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(Attribute::IS_REPEATABLE | Attribute::TARGET_CLASS)]
|
|
class ModifyColumn extends ColumnMigrationAttribute {
|
|
public function definition(): string {
|
|
$type = is_null($this->getType()) ? '' : ' to ' . $this->getType()->value;
|
|
$table = empty($this->getTable()) ? '' : ' from table \'' . $this->getTable() . '\'';
|
|
return empty($this->getName()) ?
|
|
'Modification of a column' . $table . $type
|
|
: 'Modification of column \'' . $this->getName() . '\'' . $table . $type;
|
|
}
|
|
}
|