Skip to content

[Backend] - Teacher/Student id and User id difference fix - #520

Merged
thomasdejaeghere merged 5 commits into
developmentfrom
518-database-ids-refactor
May 13, 2025
Merged

[Backend] - Teacher/Student id and User id difference fix#520
thomasdejaeghere merged 5 commits into
developmentfrom
518-database-ids-refactor

Conversation

@brieromb

@brieromb brieromb commented Apr 28, 2025

Copy link
Copy Markdown
Contributor

Removed the Teacher and Student tables from the database, as well as the TeacherOfClass and StudentOfClass tables. That is now one table: UserOfClass.
Added a field role in User table.
Changed all the queries that involved doing operations in the Student or Teacher tables.
Updated the drawio database scheme

@brieromb brieromb added enhancement New feature or request backend labels Apr 28, 2025
@brieromb brieromb added this to the Milestone 3 milestone Apr 28, 2025
@brieromb brieromb self-assigned this Apr 28, 2025
@brieromb brieromb changed the title 518 Teacher/Student id and User id difference fix [Backend] - Teacher/Student id and User id difference fix Apr 28, 2025
@brieromb brieromb linked an issue Apr 28, 2025 that may be closed by this pull request
3 tasks
@brieromb
brieromb requested a review from bramcomyn April 28, 2025 14:06
return userTypeORM;
}

public toEntity(): User {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe it would be a good idea to remove the Student and Teacher Entity and only use the User entity. An example to why this could be a good idea can be seen in the following lines. The createn of the Student/Teacher entity is basically the same here.

@thomasdejaeghere
thomasdejaeghere merged commit face037 into development May 13, 2025
@thomasdejaeghere
thomasdejaeghere deleted the 518-database-ids-refactor branch May 13, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Database] - Difference in userId vs studentId/teacherId

3 participants