@@ -1677,9 +1677,16 @@ public function testIntrospectReservedKeywordTableViaListTableDetails(): void
1677
1677
$ this ->createReservedKeywordTables ();
1678
1678
1679
1679
$ user = $ this ->schemaManager ->introspectTable ('"user" ' );
1680
- self ::assertCount (2 , $ user ->getColumns ());
1680
+ self ::assertCount (3 , $ user ->getColumns ());
1681
1681
self ::assertCount (2 , $ user ->getIndexes ());
1682
1682
self ::assertCount (1 , $ user ->getForeignKeys ());
1683
+
1684
+ if ($ this ->connection ->getDatabasePlatform () instanceof SqlitePlatform) {
1685
+ return ; // SQLite does not support table / column comment
1686
+ }
1687
+
1688
+ self ::assertSame ('table comment ' , $ user ->getComment ());
1689
+ self ::assertSame ('column comment ' , $ user ->getColumn ('user ' )->getComment ());
1683
1690
}
1684
1691
1685
1692
public function testIntrospectReservedKeywordTableViaListTables (): void
@@ -1690,9 +1697,16 @@ public function testIntrospectReservedKeywordTableViaListTables(): void
1690
1697
1691
1698
$ user = $ this ->findTableByName ($ tables , 'user ' );
1692
1699
self ::assertNotNull ($ user );
1693
- self ::assertCount (2 , $ user ->getColumns ());
1700
+ self ::assertCount (3 , $ user ->getColumns ());
1694
1701
self ::assertCount (2 , $ user ->getIndexes ());
1695
1702
self ::assertCount (1 , $ user ->getForeignKeys ());
1703
+
1704
+ if ($ this ->connection ->getDatabasePlatform () instanceof SqlitePlatform) {
1705
+ return ; // SQLite does not support table / column comment
1706
+ }
1707
+
1708
+ self ::assertSame ('table comment ' , $ user ->getComment ());
1709
+ self ::assertSame ('column comment ' , $ user ->getColumn ('user ' )->getComment ());
1696
1710
}
1697
1711
1698
1712
private function createReservedKeywordTables (): void
@@ -1705,7 +1719,9 @@ private function createReservedKeywordTables(): void
1705
1719
$ schema = new Schema ();
1706
1720
1707
1721
$ user = $ schema ->createTable ('user ' );
1722
+ $ user ->setComment ('table comment ' );
1708
1723
$ user ->addColumn ('id ' , Types::INTEGER );
1724
+ $ user ->addColumn ('user ' , Types::INTEGER )->setComment ('column comment ' );
1709
1725
$ user ->addColumn ('group_id ' , Types::INTEGER );
1710
1726
$ user ->setPrimaryKey (['id ' ]);
1711
1727
$ user ->addForeignKeyConstraint ('group ' , ['group_id ' ], ['id ' ]);
0 commit comments