Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in camel case type relation generating #282

Open
ginkenta opened this issue Sep 26, 2022 · 0 comments
Open

Error in camel case type relation generating #282

ginkenta opened this issue Sep 26, 2022 · 0 comments

Comments

@ginkenta
Copy link

ginkenta commented Sep 26, 2022

In case of generating relation with table named in snake_case the type isn`t generated properly.
To check you can specify the table with snake_case in relation field, for example with pgm:
pgm.createTable('some_table', { ..., some_field_id: { type: 'uuid', notNull: true, references: '"another_table"(id)', })

another_table type reference won`t generated properly.

To convert it was used the next command
yarn run pal schema camel-case --schema=<path to my schema>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant