schemats
schemats copied to clipboard
Generates invalid ts file if a table has column named "default"
Hello, I noticed this on postgres. Ex:
I think it should rename it to _default
Indeed, we should have a list of words allowed in SQL, but reserved in Typescript in order to rename them at generation.
You could have used var
as a column name too 😉
You can modify https://github.com/SweetIQ/schemats/blob/master/src/typescript.ts#L11 and add "default" into the reserved words and make a pull request.
You can modify /src/typescript.ts@master#L11 and add "default" into the reserved words and make a pull request.
Oh nice, didn't know.