sql-formatter icon indicating copy to clipboard operation
sql-formatter copied to clipboard

Bug: Column names equal to keywords are uppercased

Open RafaelKr opened this issue 5 months ago • 1 comments

I have the following Column definition in my Symfony project

#[ORM\Entity]
class Queue {
   [...]

    #[ORM\Column(
        insertable: false,
        updatable: false,
        columnDefinition: 'SERIAL',
    )]
    private ?int $autoIncrement = null;

   [...]
}

When generating a migration without --formatted option the column name is auto_increment. But with --formatted the column name will be AUTO_INCREMENT.

The resulting column name should be lowercase.

Edit: The doctrine/sql-formatter version is 1.2.0 Could be related to https://github.com/doctrine/sql-formatter/pull/93

RafaelKr avatar Mar 28 '24 09:03 RafaelKr