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

Postgres: Sets 'allowNull' on all non primary-key columns #55

Open
AndreKlang opened this issue Jul 4, 2023 · 1 comment
Open

Postgres: Sets 'allowNull' on all non primary-key columns #55

AndreKlang opened this issue Jul 4, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@AndreKlang
Copy link

On this line:

allowNull: !!column.is_nullable && !column.is_primary,
column.is_nullable is always a string, YES or NO (ie. the datatype yes_or_no), so !!column.is_nullable will always be true.

This can (probably) be fixed by adding c.is_nullable = 'YES' as is_nullable, to the select. It may however conflict with the c.*, which in my opinion should be replaced by the actual columns used for clarity.

Tested on PostgreSQL 13.9 (Debian 13.9-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit

@spinlud spinlud added the bug Something isn't working label Oct 17, 2023
@viligante8
Copy link

Is there any update on this? We are trying to use this package as well and also running into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants