123456789101112131415161718192021222324252627282930 |
- <?php
- declare(strict_types=1);
- namespace OCP\Migration\Attributes;
- use Attribute;
- class AddColumn extends ColumnMigrationAttribute {
-
- 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() . '\'';
- }
- }
|