Replies: 1 comment
-
@jsoneaday sorry for the late answer, hope this helps you in any case ^^ Nullable foreign keys are allowed in postgres. => The foreign key references for Further reading: https://stackoverflow.com/questions/55823485/foreign-key-bigserial-null-postgres |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have this table schema. The field secondary_lang_id is nullable, when I send data to insert that is None for that field I get the error listed below. I thought nullable foreign key relationships are allowed in postgres?
Err(Database(PgDatabaseError { severity: Error, code: "23502", message: "null value in column \"secondary_lang_id\" of relation \"job\" violates not-null constraint", detail: Some("Failing row contains (378, 2024-07-01 18:33:56.635+00, 2024-07-01 18:33:56.635+00, 1, Senior C# Developer, \n About the job\n As a Senior Mobil..., f, 1, null, 1, 1)."), hint: None, position: None, where: None, schema: Some("public"), table: Some("job"), column: Some("secondary_lang_id"), data_type: None, constraint: None, file: Some("execMain.c"), line: Some(1883), routine: Some("ExecConstraints") }))
Beta Was this translation helpful? Give feedback.
All reactions