rorm icon indicating copy to clipboard operation
rorm copied to clipboard

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

Open myOmikron opened this issue 2 years ago • 0 comments

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 avatar Oct 09 '23 01:10 myOmikron