volatiletech / sqlboiler

Generate a Go ORM tailored to your database schema.
BSD 3-Clause "New" or "Revised" License
6.56k stars 533 forks source link

Lowercase column names before applying `TitleCase` #1357

Closed esdrasbeleza closed 3 months ago

esdrasbeleza commented 4 months ago

I have a database which I cannot change and all the fields are in SCREAMING_SNAKE_CASE.

When I generate my models, USER_ID becomes USER_ID in my Go structs, which is not what I want and doesn't follow the expected Go conventions: I expect my field to be generated as UserID.

This small change will make my model be properly generated.

stephenafamo commented 3 months ago

This would be a breaking change for many users, so I will close this.

For your case, I suggest renaming them using aliases.