-
Notifications
You must be signed in to change notification settings - Fork 16
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
Create tables for opportunity attachments #2123
Labels
Comments
github-project-automation
bot
moved this to Icebox
in Simpler.Grants.gov Product Backlog
Sep 17, 2024
github-project-automation
bot
moved this to Todo
in SimplerGrants Product Backlog (experiment to be deleted)
Sep 27, 2024
mxk0
changed the title
[Task]: Create tables for opportunity attachments
Create tables for opportunity attachments
Oct 2, 2024
mxk0
added
topic: backend
Backend development tickets
refinement
and removed
Migrated
labels
Oct 6, 2024
5 tasks
mikehgrantsgov
closed this as completed
by moving to Done
in
Simpler.Grants.gov Product Backlog
Oct 17, 2024
mikehgrantsgov
added a commit
that referenced
this issue
Oct 17, 2024
## Summary Fixes #2123 ### Time to review: 10 mins ## Changes proposed - Add models and supporting migrations for Opportunity attachments, including lookup table for type. ## Context for reviewers See generated migration and screenshots of result after db upgrade. Only the created_by, updated_by, and legacy_folder_id columns should be nullable. ## Additional information Screenshots of new tables after running `make db-upgrade` <img width="1060" alt="Screenshot 2024-10-16 at 9 53 59 AM" src="https://github.com/user-attachments/assets/58e6e8b6-e86f-40b8-a7b3-93524d794456"> <img width="1062" alt="Screenshot 2024-10-16 at 9 53 47 AM" src="https://github.com/user-attachments/assets/692faac8-eefb-4845-b231-14ad403ddfad"> <img width="874" alt="Screenshot 2024-10-16 at 9 55 06 AM" src="https://github.com/user-attachments/assets/e877a79e-15cc-4f1a-ac36-fb3fa4526515"> --------- Co-authored-by: Michael Huneke <[email protected]> Co-authored-by: Michael Chouinard <[email protected]> Co-authored-by: nava-platform-bot <[email protected]>
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We want to create the following two tables in our SQLAlchemy models:
Only the created_by, updated_by, and legacy_folder_id columns should be nullable. Note you can use the python typing to dictate this.
my_field: Mapped[int]
is not nullable.my_field: Mapped[int | None]
is nullable.The
lk_opportunity_attachment_type_id
lookup table should follow our conventions for setting up a lookup table. We will only have two values at the moment for this lookup enum:notice_of_funding_opportunity
other
See: https://github.com/navapbc/simpler-grants-gov/blob/main/documentation/api/lookup-values.md for further details on how this works.
Acceptance criteria
The text was updated successfully, but these errors were encountered: