@@ -1675,9 +1675,11 @@ public function testIntrospectReservedKeywordTableViaListTableDetails(): void
1675
1675
$ this ->createReservedKeywordTables ();
1676
1676
1677
1677
$ user = $ this ->schemaManager ->introspectTable ('"user" ' );
1678
- self ::assertCount (2 , $ user ->getColumns ());
1678
+ self ::assertCount (3 , $ user ->getColumns ());
1679
1679
self ::assertCount (2 , $ user ->getIndexes ());
1680
1680
self ::assertCount (1 , $ user ->getForeignKeys ());
1681
+ self ::assertSame ('table comment ' , $ user ->getComment ());
1682
+ self ::assertSame ('column comment ' , $ user ->getColumn ('user ' )->getComment ());
1681
1683
}
1682
1684
1683
1685
public function testIntrospectReservedKeywordTableViaListTables (): void
@@ -1688,9 +1690,11 @@ public function testIntrospectReservedKeywordTableViaListTables(): void
1688
1690
1689
1691
$ user = $ this ->findTableByName ($ tables , 'user ' );
1690
1692
self ::assertNotNull ($ user );
1691
- self ::assertCount (2 , $ user ->getColumns ());
1693
+ self ::assertCount (3 , $ user ->getColumns ());
1692
1694
self ::assertCount (2 , $ user ->getIndexes ());
1693
1695
self ::assertCount (1 , $ user ->getForeignKeys ());
1696
+ self ::assertSame ('table comment ' , $ user ->getComment ());
1697
+ self ::assertSame ('column comment ' , $ user ->getColumn ('user ' )->getComment ());
1694
1698
}
1695
1699
1696
1700
private function createReservedKeywordTables (): void
@@ -1703,7 +1707,9 @@ private function createReservedKeywordTables(): void
1703
1707
$ schema = new Schema ();
1704
1708
1705
1709
$ user = $ schema ->createTable ('user ' );
1710
+ $ user ->setComment ('table comment ' );
1706
1711
$ user ->addColumn ('id ' , Types::INTEGER );
1712
+ $ user ->addColumn ('user ' , Types::INTEGER )->setComment ('column comment ' );
1707
1713
$ user ->addColumn ('group_id ' , Types::INTEGER );
1708
1714
$ user ->setPrimaryKey (['id ' ]);
1709
1715
$ user ->addForeignKeyConstraint ('group ' , ['group_id ' ], ['id ' ]);
0 commit comments