Skip to content

Proj d01/design postgre sql schemas#80

Open
georges-nasrallah wants to merge 13 commits into
mainfrom
PROJ-D01/Design-postgreSQL-schemas
Open

Proj d01/design postgre sql schemas#80
georges-nasrallah wants to merge 13 commits into
mainfrom
PROJ-D01/Design-postgreSQL-schemas

Conversation

@georges-nasrallah

@georges-nasrallah georges-nasrallah commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Design and document the PostgreSQL schema for all five services, establishing per-service migration files as the single source of truth for database structure.

Closes #17


Motivation & Context

Before any service implementation can begin, the database schema must be agreed upon and documented. This PR establishes the schema-per-service approach using Flyway (Spring Boot services) and Alembic (Python services), replacing the previous empty central services/db/schema.sql.


Changes

  • Added Flyway migration + README for auth (users, refresh_tokens)
  • Added Flyway migration + README for document (profiles, work_experiences, educations, skills, certifications,
    languages, cover_letters, resumes)
  • Added Flyway migration + README for application (applications, fit_analyses)
  • Added Alembic migration + README for email (email_connections, processed_emails) — moved from Spring Boot to
    Python/FastAPI
  • Added Alembic migration + README for genai (chat_sessions with pgvector embedding, chat_messages, user_memory)
  • Removed central services/db/schema.sql in favour of per-service migrations
  • Updated CLAUDE.md to reflect email service language change and current state
  • Fixed docker-compose.yml postgres hostname from postgres to postgres-db in auth datasource URL

Steps for Testing

  1. Review each migration file under services/<name>/src/main/resources/db/migration/ (Spring Boot) or
    services/<name>/alembic/versions/ (Python)
  2. Verify schema matches DB_SCHEMAS.md (gitignored, available locally)
  3. No runtime verification needed - migration files require Flyway/Alembic wiring which is a follow-up task per service owner (see each service README)

Checklist

  • I have self-reviewed the diff
  • Code is clean — no debug statements, commented-out code, or TODOs left behind
  • All CI checks pass (build · test · lint)
  • [] Tests added or updated to cover the changes (if needed) — N/A, schema only
  • [] New env vars added to .env.example — N/A
  • [] OpenAPI spec updated and codegen re-run — N/A
  • [] Screenshots or screen recordings attached for any UI changes — N/A

@georges-nasrallah georges-nasrallah added this to the Sprint 1 milestone Jun 21, 2026
@georges-nasrallah georges-nasrallah self-assigned this Jun 21, 2026
@georges-nasrallah georges-nasrallah added task Technical or process task server Spring Boot backend fix labels Jun 21, 2026
@georges-nasrallah

Copy link
Copy Markdown
Collaborator Author

The database schemas in this PR are a baseline setup. Each service owner is free to modify their schema if needed as implementation progresses. The SQL migration files are intentionally left unwired connecting Flyway (Spring Boot) or
Alembic (Python) to each service.

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

Labels

fix server Spring Boot backend task Technical or process task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PROJ-D01] Design and document full PostgreSQL schema

1 participant