-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
## Summary Fixes #2371 ### Time to review: __10 mins__ ## Changes proposed High-level - renamed `agency` in the opportunity models to `agency_code` - both at the API and DB layer Remove agency name and agency code from the opportunity summary response object (should not be used - the opportunity values are more accurate) A lot of fixes for tests that were checking for the old name Deleted an import-csv script that wasn't needed anymore (and would've needed fixes) ## Context for reviewers `agency` is way too generic of a name, and `agency_code` makes more sense. Agency info is also split across an opportunity and summary. Some of this was duplicated (code and name) and we want to avoid confusion by having these values duplicated. ## Additional information Did a quick pass on the existing search UI, don't see anything having broken yet. Query box, sorting, and filters all work, as well as the agency itself being displayed in search. I also switched the frontend to use v1 and didn't see any issues <img width="1184" alt="Screenshot 2024-10-25 at 3 33 08 PM" src="https://github.com/user-attachments/assets/ff0ad334-69dd-43da-a548-dcc5591e26c0"> <img width="1171" alt="Screenshot 2024-10-25 at 3 33 27 PM" src="https://github.com/user-attachments/assets/569a4f73-cdba-45b8-94df-910a1841863f"> --------- Co-authored-by: nava-platform-bot <platform-admins@navapbc.com>
- Loading branch information
1 parent
56acd6d
commit c5dd97f
Showing
28 changed files
with
127 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
api/src/db/migrations/versions/2024_11_01_rename_agency_column.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"""rename agency column | ||
Revision ID: 3640e31e6a85 | ||
Revises: 8b96ade6f6a2 | ||
Create Date: 2024-11-01 12:57:11.887858 | ||
""" | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "3640e31e6a85" | ||
down_revision = "8b96ade6f6a2" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index("opportunity_agency_idx", table_name="opportunity", schema="api") | ||
op.alter_column("opportunity", "agency", new_column_name="agency_code", schema="api") | ||
op.create_index( | ||
op.f("opportunity_agency_code_idx"), | ||
"opportunity", | ||
["agency_code"], | ||
unique=False, | ||
schema="api", | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index(op.f("opportunity_agency_code_idx"), table_name="opportunity", schema="api") | ||
op.alter_column("opportunity", "agency_code", new_column_name="agency", schema="api") | ||
op.create_index( | ||
"opportunity_agency_idx", "opportunity", ["agency_code"], unique=False, schema="api" | ||
) | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.