Skip to content

Commit 92ff3b8

Browse files
committed
feat(db-schema): Add IColumn::getName
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent b3f362f commit 92ff3b8

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

lib/private/DB/Schema/Column.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ public function setDefault(mixed $default): self {
9292
return $this;
9393
}
9494

95+
#[\Override]
96+
public function getName(): string {
97+
/** @var non-empty-string $name */
98+
$name = $this->column->getName();
99+
return $name;
100+
}
101+
95102
#[\Override]
96103
public function getType(): ColumnType {
97104
return ColumnType::from(DBALType::lookupName($this->column->getType()));

lib/public/DB/Schema/IColumn.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ public function setNotnull(bool $notnull): self;
5959
*/
6060
public function setDefault(mixed $default): self;
6161

62+
/**
63+
* @since 35.0.0
64+
* @return non-empty-string
65+
*/
66+
public function getName(): string;
67+
6268
/**
6369
* Returns the type of this column.
6470
*

0 commit comments

Comments
 (0)