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

Can we check if all necessary fields are in an insert patch #59

Open
myOmikron opened this issue Oct 9, 2023 · 0 comments
Open

Can we check if all necessary fields are in an insert patch #59

myOmikron opened this issue Oct 9, 2023 · 0 comments
Labels
question Further information is requested

Comments

@myOmikron
Copy link
Member

Is there any way to check if all necessary fields (not null, without default, without auto_create_time, id) are in patches that are used in insert! statements?

Happened recently to me, that I added an DbEnum to a model, but missed the patch, I was using for inserting. As the program compiled just fine, take me some time to check, why I'm getting an:

Failed to insert z: sqlx error: error returned from database: null value in column "x" of relation "y" violates not-null constraint
@myOmikron myOmikron added the question Further information is requested label Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant