Skip to content

Migrate student_enrolled_courses and student_completed_courses to user-profile-service #87

Description

@kirillinoz

Context

During AIDAN 1 (PR #82), @quarz12 noted that student_enrolled_courses and student_completed_courses tables logically belong in the user-profile-service, not in the main server's security database.

These tables were kept in server for AIDAN 1 to avoid blocking the feature, but should be migrated as follow-up.

What needs to change

The user-profile-service currently stores all data as JSON blobs in a profiles table. Migrating these tables requires:

  • Add relational tables (student_enrolled_courses, student_completed_courses) to user-profile-service with proper schema (FK constraints, grades, credits, semester_key, category, etc.)
  • Expose CRUD REST endpoints on user-profile-service for enrolled/completed courses
  • Replace direct DB access in server's StudentDataDB with HTTP calls to user-profile-service via RestClient
  • Update both services' test configs
  • Data migration if needed

Current location

server/src/main/java/tum/devops/http418/data/DataSourceConfig.java — tables created in the security DB bean.
server/src/main/java/tum/devops/http418/data/StudentDataDB.java — all data access logic.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions