Skip to content
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 buildings table #125

Merged
merged 28 commits into from
Nov 5, 2023
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
65cf98b
Create buildings table
helenellyx Jun 26, 2023
05e7869
Merge branch 'main' into helen/create-building-table
helenellyx Jun 27, 2023
7a8a620
Set up buildings table to have prexisting building
helenellyx Jun 30, 2023
2a2721c
Merge branch 'main' into helen/create-building-table
helenellyx Jul 18, 2023
1b33a9a
Create script
helenellyx Jul 18, 2023
6f0ed56
Merge branch 'main' into helen/create-building-table
helenellyx Jul 18, 2023
41b6453
Change building_id to building
helenellyx Jul 20, 2023
8c7f62d
move script to seeding dir
Safewaan Jul 24, 2023
f1dc59a
Update backend/app/services/implementations/log_records_service.py
helenellyx Jul 25, 2023
bf0b625
Add JOIN statement
helenellyx Jul 25, 2023
153a8d2
Merge branch 'helen/create-building-table' of github.com:uwblueprint/…
helenellyx Jul 25, 2023
41f3b15
Merge branch 'main' into helen/create-building-table
phamkelly17 Oct 7, 2023
5b983b2
fix features to use building_id instead of building
phamkelly17 Oct 9, 2023
cbd6215
format
phamkelly17 Oct 9, 2023
b97a423
chnage building to building id
phamkelly17 Oct 9, 2023
5573674
fix csv
phamkelly17 Oct 9, 2023
6ce15e3
address PR comments
phamkelly17 Oct 22, 2023
df43cb8
add default buildings on db creation
Oct 30, 2023
cfaa726
pr comments
phamkelly17 Nov 2, 2023
8ba2af2
Merge branch 'helen/create-building-table' of https://github.com/uwbl…
phamkelly17 Nov 2, 2023
b56a58c
fix merge conflicts
Nov 4, 2023
aead0dc
fix merge conflicts
Nov 4, 2023
3a7b1a0
final touchups
Nov 4, 2023
4f5a8d5
final touchups
Nov 4, 2023
e41b1d5
remove redundant date check
Nov 4, 2023
8d2df42
run linter there's so many changes
Nov 4, 2023
e49312c
add building filters when counting log records
Nov 5, 2023
0e9f68c
Merge branch 'main' into helen/create-building-table
phamkelly17 Nov 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add JOIN statement
  • Loading branch information
helenellyx committed Jul 25, 2023
commit bf0b6254d857ccc8d134879312f411d44b2a5a87
5 changes: 3 additions & 2 deletions backend/app/services/implementations/log_records_service.py
Original file line number Diff line number Diff line change
@@ -152,7 +152,8 @@ def get_log_records(
FROM log_records logs\n \
LEFT JOIN users attn_tos ON logs.attn_to = attn_tos.id\n \
JOIN users employees ON logs.employee_id = employees.id \n \
JOIN residents ON logs.resident_id = residents.id"
JOIN residents ON logs.resident_id = residents.id \n \
JOIN buildings on logs.building_id = buildings.id"

sql += self.filter_log_records(filters)

@@ -244,4 +245,4 @@ def update_log_record(self, log_id, updated_log_record):
raise Exception(
"Log record with id {log_id} not found".format(log_id=log_id)
)
db.session.commit()
db.session.commit()