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

Add proper professor table migration #841

Merged
merged 2 commits into from
Nov 3, 2023
Merged

Add proper professor table migration #841

merged 2 commits into from
Nov 3, 2023

Conversation

dorian451
Copy link
Contributor

Issue

Quick fix to #752

@dorian451 dorian451 self-assigned this Nov 3, 2023
@dorian451 dorian451 requested a review from jonha1 November 3, 2023 21:07
Copy link
Contributor

@jonha1 jonha1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job!

@jonha1 jonha1 merged commit 39b9bdd into master Nov 3, 2023
3 checks passed
@jonha1 jonha1 deleted the fix_professor_table branch November 3, 2023 21:11
dorian451 added a commit that referenced this pull request Nov 10, 2023
* revert changes to migration files

* generate migration for professors table with updated columns
jonha1 added a commit that referenced this pull request Nov 13, 2023
* Created Professor, club/organziation, and pathway entities(draft)

draft of the professors , club/organization, and pathways entitiy

* Changed SQLalchemy version to 1.4.1

the title

* Adding professors

created functions which should add professors into database
- added foreign key to certain tables

* started professor page

* Remove webex form professor

- Removed webex from table
- planned what other functions to add
for the future

* Professor Name

created function for getting professor first and last name and stores it in json file

* Get professor name by email

- Implemented function for getting professor name by email
- fixed bug where professor table caused YACS to show a blank screen
- updated the requirements

* Removing professor from database

- further testing on /api/professor
- implementation of remove professor function

* Fix finding professor name by eamil

- fixed function on app.py
- added getter function to get profesor by name
- added get prfoesor info by rcsid
- modified Professor table

* FIxed functions for professor

- gave %s values

* Implement more professor functions

Functions:
- get professor by department
- get all professors
- get professor phone number by email

* starting professor explore page

* Added Professor functions

- added get_office_hours_by_email
- added get_professor_rcs_by_email

* Professor functions

implemented all functions except add professor

* worked on professor functions

* Add Professor

- added professor function
- fix remove professor

* got alphabet-sorted professor page working

* created department view

* fixed spacing, buttons, and alphabetization

* created professor pop-up

* added professors header button

* Debugging API calls

- add professors is not working, Internal server error

* Debbuging continued

- compared professor to courses and investigated docker issue

* Debugging continued

- continued debugging for APIs

* possible patch to fix

* change to get method

* Update YacsService.js

* API fix

fixing and testing API calls

* Error with professor test case

- receiving foreign key restraint although there is no foreign key specified

* IT WORKS

debugged API call for testing and retrieving professor

* Finished debugging on localhost

add and remove now work

* move professor api calls to frontend service and created a editProfessors page

* Admin API calls

- all are working except remove and add prof test

* made professor profile page

* debuggign remove professor

remove works on localhost but not on admin

* remove professor

remove professor for admin works

* Bulk upload

- starting bulk upload function

* Improved Admin Page and Maintanence

- made code consistent
- better buttons for admin page
- foreign key for crn

* Bulk upload and clear cache

- created function for bulk upload, remove all and clear cache
- needs testing

* Modified Professor Page and add professor

- fixing add professor
- changed what Professor stores

* Add professor is delayed

It takes a while for add_professor to be seen in getProf

* professor header button icon

* fix add professor

should have fixed add professor

* removed professor phone number

* add bulk professor

- made function to turn a json file into sql tables

* fixed heading alignment

* clean up

cleaning up correct and minor edit

* Fix duplicate Professor

removed duplicate professor table

* added button on admin page

import professor via json

* starting json from frontend to backend

creating front end portion of button

* working on json upload

- fixing json upload to be received into database

* fix issues on the UI of professor bulk insert

* needs testing

json file ready to be tested, need to check with get professors function

* slight modifications to taking in professor json file

turns to string before using function
and fix errors

* cleaned up code

got rid of useless import and improved commenting

* Debug import json file

- changed professor table
- changed functions
- changed requirements

* fixed merge conflict

* Fixing professor json

uploaded json data
json data is being uplaoded a file name, which is wrong

* Professor commenting and debugging

continued working and commenting integration

* cleane up

deleted unecessary lines

* tesitng

see if it fixes code factoring

* code factoring error fixing

fix Possible SQL injection vector through string-based query construction.

* put professor into database

* reveal what to do for testing

added comments

* located error

* debugging database table creation

* fixed skipping database initalization

- new problem ERROR:  relation "professor" already exists
duplicate professor?

* professor database

fixed database names for professor

* fixed attribute name issue

* Improved security

deleted api functions that won't be tested and prevented possible Possible SQL injection vector through string-based query construction

* clean up and improved secuirty

prevented sql inejctions

* updated Department

* fixed warning

* fix warning

* fix warning

* Update professor.py

* removed unnecessary functions

we don't need professors' rcs id

* warning fix

* attempt at fixing warning

* attempt at fixing warning

* fix warning

* fix warning

* Update professor.py

* fixing security error with SQL

* fixing SQL errors

* fixing

* cleaning up function

* trying to get sql injeciton errors

* try again :(

* does this fix it

* few more changes

* get professor buttons work

* clean up

* testing

* revert

* clean up

deleted unecessary lines of code

* clean up

got rid of useless code for cleaner UI

* Create ProfExplorer.vue

* Switched order of prof and final

* fixed backend

deleted useless file

* upload to JSON works

* fix syntax error

* attempting to fix syntax issues

causing lighthouse CI to crash

* Add proper professor table migration (#841)

* revert changes to migration files

* generate migration for professors table with updated columns

* professor table: fix column names

---------

Co-authored-by: ragar3 <qN%ZMi6Q3nq7Qi>
Co-authored-by: Harry Tan <32246618+DarknessUnder@users.noreply.github.com>
Co-authored-by: ragar3 <112728733+ragar3@users.noreply.github.com>
Co-authored-by: Jun Song <40209659+Acewvrs@users.noreply.github.com>
Co-authored-by: EggyRepublic <Eggyrepublic@gmail.com>
Co-authored-by: dorian451 <112524240+dorian451@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants