From a2df49499d093e0e7fde385d60b371278ba28c9e Mon Sep 17 00:00:00 2001 From: Pfilsx Date: Thu, 22 Dec 2022 23:08:53 +0300 Subject: [PATCH] Add enum class comment to created enums --- src/DBAL/Platform/PostgreSQLPlatform.php | 2 +- src/DBAL/Schema/SchemaDiff.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DBAL/Platform/PostgreSQLPlatform.php b/src/DBAL/Platform/PostgreSQLPlatform.php index c0688dd..53df92d 100644 --- a/src/DBAL/Platform/PostgreSQLPlatform.php +++ b/src/DBAL/Platform/PostgreSQLPlatform.php @@ -84,7 +84,7 @@ public function quoteEnumLabel(mixed $label): int|string } } - protected function initializeDoctrineTypeMappings() + protected function initializeDoctrineTypeMappings(): void { parent::initializeDoctrineTypeMappings(); diff --git a/src/DBAL/Schema/SchemaDiff.php b/src/DBAL/Schema/SchemaDiff.php index 83d800e..0bfa63c 100644 --- a/src/DBAL/Schema/SchemaDiff.php +++ b/src/DBAL/Schema/SchemaDiff.php @@ -67,6 +67,7 @@ public function toSql(AbstractPlatform $platform): array foreach ($this->getCreatedTypes() as $type) { $sql[] = $platform->getCreateTypeSql($type); + $sql[] = $platform->getCommentOnTypeSql($type); } foreach ($this->getAlteredTypes() as $alterTypeArray) {