-
Notifications
You must be signed in to change notification settings - Fork 2
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
DEV_21 #6
Conversation
@@ -49,8 +50,15 @@ def __init__(subclass, *args, **kwargs): | |||
comment = satable.columns[k].comment | |||
if v.description and comment is None: | |||
satable.columns[k].comment = v.description | |||
# append inserted_at as last column | |||
satable.append_column(Column("inserted_at", DateTime, default=datetime.utcnow)) | |||
# append observed_at as last column |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will/are we get/ting the actual version of the DB before running this, or will this column always contain new values on every run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the observed_at
column is inserted at the SQLAlchemy level, SQLModel doesn't know about it (it's not a ~pydantic field), so if there's no change in the actual values of the row, the observed_at
field will NOT be updated in the database via the session.merge
calls.
aws.py
into helper/getter sections (sorry, this is a painful diff)