:memo: Add example code for sa_column onupdate timestamps
Issue #370 is a common usecase and there have been a few other questions about how to implement created_at or updated_at timestamps in rows. This PR adds examples to the advanced section of the documentation on how this can be done with sa_columns, and also links the relevant sections of Pydantic documentation which show how to use factories or validators to achieve a similar thing with Pydantic.
Codecov Report
Base: 98.49% // Head: 97.74% // Decreases project coverage by -0.75% :warning:
Coverage data is based on head (
d78fc71) compared to base (ea79c47). Patch coverage: 0.00% of modified lines in pull request are covered.
:exclamation: Current head d78fc71 differs from pull request most recent head b160fc8. Consider uploading reports for the commit b160fc8 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## main #372 +/- ##
==========================================
- Coverage 98.49% 97.74% -0.76%
==========================================
Files 185 186 +1
Lines 5856 5901 +45
==========================================
Hits 5768 5768
- Misses 88 133 +45
| Impacted Files | Coverage Ξ | |
|---|---|---|
| docs_src/advanced/sa_column/tutorial001.py | 0.00% <0.00%> (ΓΈ) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
π Docs preview for commit 893bcf3d71c493077ad2306c184e9ccf4c8aa7c7 at: https://63131ab0d8aeff704c33fd2d--sqlmodel.netlify.app
π Docs preview for commit 1e5caaaf02b46f50f48ff5141f4f7980e36387e2 at: https://6326cad9fcbd027752da81e2--sqlmodel.netlify.app
π Docs preview for commit d78fc7116a241ef9aef41ab7d927192ff3e48df9 at: https://636244bbeb67cb7064300959--sqlmodel.netlify.app
Full path to the docs page: https://636244bbeb67cb7064300959--sqlmodel.netlify.app/advanced/sa-column/
π Docs preview for commit b160fc8a163a37e7201adef2af1e6f22539d68e8 at: https://639ce08a1f184e006c3a2967--sqlmodel.netlify.app
This is actually very valuable documentation which I was a bit missing. What is it missing to get merged?