-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update all remaining legacy SQL queries to use the new syntax #1648
Comments
Hey team! Please add your planning poker estimate with Zenhub @cris-oddball @EvanParish @k-macmillan @ldraney |
I upgrade all remaining legacy queries in app/ as part of the first task (the grep statements). Ergo, the TODO task became a non-issue. |
…1656) Co-authored-by: Mackenzie Halliday <[email protected]>
Needing @kalbfled to check the AC boxes off in this ticket. Will look at performance on Monday. |
Checked DD for performance the past month, no significant changes positive or negative. |
User Story - Business Need
SQLAlchemy v1.4 supporters two syntaxes for making database queries, but SQLAlchemy v2 only supports the newer syntax. Before we can update to v2, we need to convert all instances of legacy syntax to the newer syntax.
This work began with #1538. This ticket should finish the job.
User Story(ies)
As a VA Notify developer
I want to update legacy database query syntax to the new version
So that we can upgrade to SQLAlchemy v2.
Additional Info and Resources
app queries
Engineering Checklist
IMPORTANT NOTE: Legacy queries generally start with
<model class>.query
. Depending on context, updated syntax might use a new style query (i.e.stmt = select(Notification).where(...)
followed by an execution statement) or an updated ORM call (i.e. replaceNotification.query.count() == 1
withnotify_db_session.session.get(Notification, notification_id) is not None
, or write a statement to select the count).grep -rn -E "\.query(\.|\()"
grep -rn filter_by
(not all matches are part of queries)./app/
queries:./app/
queries need aTODO:
comment and to be deleted, ensuring the methods return appropriate values.TODO
comments have tickets listed. These should be cleanup tickets. We do not use fido2, organisations, nor letters.TODO
comment and add these to a ticket, so we can investigate them.Acceptance Criteria
QA Considerations
Potential Dependencies
Leave blank if n/a
Out of Scope
The text was updated successfully, but these errors were encountered: