Skip to content

📝 Add example code for sa_column onupdate timestamps #372

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

RobertRosca
Copy link
Contributor

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.

@RobertRosca RobertRosca force-pushed the docs/created_updated_at_cols branch from d53330d to 893bcf3 Compare September 3, 2022 09:12
@codecov
Copy link

codecov bot commented Sep 3, 2022

Codecov Report

Base: 98.49% // Head: 97.74% // Decreases project coverage by -0.75% ⚠️

Coverage data is based on head (d78fc71) compared to base (ea79c47).
Patch coverage: 0.00% of modified lines in pull request are covered.

❗ 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.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented Sep 3, 2022

📝 Docs preview for commit 893bcf3 at: https://63131ab0d8aeff704c33fd2d--sqlmodel.netlify.app

@github-actions
Copy link

📝 Docs preview for commit 1e5caaa at: https://6326cad9fcbd027752da81e2--sqlmodel.netlify.app

@github-actions
Copy link

github-actions bot commented Nov 2, 2022

📝 Docs preview for commit d78fc71 at: https://636244bbeb67cb7064300959--sqlmodel.netlify.app

@RobertRosca
Copy link
Contributor Author

@github-actions
Copy link

📝 Docs preview for commit b160fc8 at: https://639ce08a1f184e006c3a2967--sqlmodel.netlify.app

@tiangolo tiangolo added the docs Improvements or additions to documentation label Oct 22, 2023
@MRigal
Copy link

MRigal commented Feb 16, 2024

This is actually very valuable documentation which I was a bit missing. What is it missing to get merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation investigate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants