Commit a052725
authored
Callsign Migration (#623)
# Purpose
Closes #616 .
Explain the purpose of the PR here if it doesn't match the linked issue.
Be sure to add a comment in the linked issue explaining the changes.
Check PR for purpose
# New Changes
Explain new changes below in short bullet points.
- added to callsigns.csv (ty julian!) to resources
- created new model in aro users to store callsigns
- read csv file with csv lib and return a list of all callsigns
- checks if callsigns table is already populated. if not, migrate list
contents upon app startup
- automatic B-tree indexing thanks to PostgreSQL
# Testing
Explain tests that you ran to verify code functionality.
- [x] I have unit-tested this PR. Otherwise, explain why it cannot be
unit-tested.
I performed startup and callsign data was created in local database (see
screenshots below)
- [x] I have included screenshots of the tests performed below.
1. delete pre-existing data in callsigns table
<img width="274" height="31" alt="image"
src="https://github.com/user-attachments/assets/ddb5175d-0020-45b0-be72-5ce3242403a8"
/>
2. start app with ```fastapi dev gs/backend/main.py```
<img width="350" height="213" alt="image"
src="https://github.com/user-attachments/assets/9198f32d-d533-463d-8c8d-3be7df050ff8"
/>
3. check db to see newly inserted callsign entries
<img width="299" height="290" alt="image"
src="https://github.com/user-attachments/assets/55ea51d8-6902-4b51-ac7b-f600bf156051"
/>
# Outstanding Changes
If there are non-critical changes (i.e. additional features) that can be
made to this feature in the future, indicate them here.
update wrappers to support new callsigns table.1 parent 8118fa3 commit a052725
File tree
6 files changed
+90925
-3
lines changed- gs/backend
- api
- data
- resources
- tables
6 files changed
+90925
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
0 commit comments