Skip to content

Conversation

lpi-tn
Copy link
Collaborator

@lpi-tn lpi-tn commented Sep 24, 2025

This pull request introduces a new inferred user tracking system to the database schema and ORM models. The main changes add three new tables—inferred_user, session, and endpoint_request—to the user_related schema, along with corresponding SQLAlchemy models to support user session tracking and endpoint request logging.

Database schema additions:

  • Added migration file alembic/versions/e354666f951d_inferred_user.py to create the inferred_user, session, and endpoint_request tables in the user_related schema. Each table includes relevant columns, primary keys, and foreign key relationships for session and request tracking.

ORM model additions:

  • Added InferredUser, Session, and EndpointRequest SQLAlchemy models in welearn_datastack/data/db_models.py, mirroring the new tables and relationships defined in the migration. These models allow application code to interact with inferred users, sessions, and endpoint requests.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces an inferred user tracking system with three new database tables (inferred_user, session, and endpoint_request) and corresponding SQLAlchemy models to support user session tracking and endpoint request logging.

  • Adds database migration to create the new tracking tables in the user_related schema
  • Creates SQLAlchemy ORM models for the three new entities with appropriate relationships
  • Establishes foreign key relationships between sessions and inferred users, and between endpoint requests and sessions

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
alembic/versions/e354666f951d_inferred_user.py Database migration creating the three new tables with proper schema, columns, and constraints
welearn_datastack/data/db_models.py SQLAlchemy ORM models for InferredUser, Session, and EndpointRequest with mapped columns and relationships

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@lpi-tn lpi-tn merged commit 6bbec81 into main Sep 24, 2025
7 checks passed
@lpi-tn lpi-tn deleted the Feature/infered_user_tables branch September 24, 2025 13:39
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