]> git.ipfire.org Git - thirdparty/fastapi/sqlmodel.git/commit
✨ Do not allow invalid combinations of field parameters for columns and relationships...
authorSebastián Ramírez <tiangolo@gmail.com>
Sat, 28 Oct 2023 13:55:23 +0000 (17:55 +0400)
committerGitHub <noreply@github.com>
Sat, 28 Oct 2023 13:55:23 +0000 (17:55 +0400)
commit717594ef13b64d0d4fd1ce7c6305c945f68460d3
treef5443e192a3af27f817500be3b156edcd395d484
parente4e1385eedc700ad8c4e079841a85c32a29f1cff
✨ Do not allow invalid combinations of field parameters for columns and relationships, `sa_column` excludes `sa_column_args`, `primary_key`, `nullable`, etc. (#681)

* ♻️ Make sa_column exclusive, do not allow incompatible arguments, sa_column_args, primary_key, etc

* ✅ Add tests for new errors when incorrectly using sa_column

* ✅ Add tests for sa_column_args and sa_column_kwargs

* ♻️ Do not allow sa_relationship with sa_relationship_args or sa_relationship_kwargs

* ✅ Add tests for relationship errors

* ✅ Fix test for sa_column_args
sqlmodel/main.py
tests/test_field_sa_args_kwargs.py [new file with mode: 0644]
tests/test_field_sa_column.py [new file with mode: 0644]
tests/test_field_sa_relationship.py [new file with mode: 0644]