Skip to content

docs: update backend database schema section in README#232

Open
CodeSparks45 wants to merge 1 commit into
ionfwsrijan:mainfrom
CodeSparks45:docs/update-db-schema
Open

docs: update backend database schema section in README#232
CodeSparks45 wants to merge 1 commit into
ionfwsrijan:mainfrom
CodeSparks45:docs/update-db-schema

Conversation

@CodeSparks45

@CodeSparks45 CodeSparks45 commented Jun 28, 2026

Copy link
Copy Markdown

Before opening: make sure there is an issue tracking this work, and link it below. PRs without a linked issue may be closed without review.

Linked issue

Closes #214

What this PR does

This PR synchronizes the database schema documentation in backend/README.md with the actual SQLite implementation found in backend/app/db.py. It comprehensively documents all six actively initialized tables along with their respective column types, descriptions, and foreign key relationships to eliminate documentation drift.

Type of change

  • Bug fix
  • New feature
  • ML model / training pipeline
  • Refactor (no behaviour change)
  • Documentation
  • Tests only

ML tier (if applicable)

  • Tier 1 — Triage
  • Tier 2 — Predictive
  • Tier 3 — Autonomous
  • Not ML-related

Stack affected

  • Backend
  • Frontend
  • Both

Changes

Backend

  • Replaced the outdated ## Database Schema section in backend/README.md with accurate markdown tables representing the current database state.

Frontend

New dependencies

Database / schema changes

  • Documented missing tables (org_jobs, verify_outcomes, contributor_stats, dependency_links).
  • Documented newly appended columns in existing tables (e.g., package_name, ml_score, false_positive in findings).

Testing

How did you test this?

Performed a manual cross-reference between the SQL CREATE TABLE and ALTER TABLE execution queries in backend/app/db.py and the newly formatted markdown tables. Rendered the markdown locally in VS Code to ensure standard GitHub Flavored Markdown (GFM) table formatting is visually intact and readable.

Checklist

  • Tested locally end-to-end (upload ZIP or GitHub URL → scan → findings returned correctly)
  • New ML model falls back gracefully when model file is absent
  • No new console.error or unhandled Python exceptions introduced
  • Added or updated tests where applicable
  • requirements.txt / package.json updated if new dependencies added
  • New model files (.pkl, .pt, etc.) are gitignored, not committed

Anything reviewers should focus on

No complex logic changes. Please verify that the documented columns align exactly with the current db.py initialization logic.

Screenshots (if UI changed)

@github-actions

Copy link
Copy Markdown

🎉 Thank you @CodeSparks45 for submitting a Pull Request!

We're excited to review your contribution.

Before Review

✅ Ensure all CI checks pass
✅ Complete the PR template
✅ Link the related issue

Want faster reviews and contributor support?

Join our Discord community:

🔗 https://discord.gg/FcXuyw2Rs

Maintainers and mentors are active there and can help resolve blockers quickly.

Happy Contributing! 🚀

@github-actions github-actions Bot added SSoC26 needs-work Work needed backend Backend issues documentation Improvements or additions to documentation and removed needs-work Work needed labels Jun 28, 2026
@github-actions

Copy link
Copy Markdown

PR template check passed!

@arpit2006 this PR is ready for your review. 🚀

@github-actions github-actions Bot requested a review from arpit2006 June 28, 2026 02:02
Signed-off-by: CodeSpark45 <somvanshipavan2006@gmail.com>

@arpit2006 arpit2006 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@CodeSparks45 !
Create a docs folder and create this database.md in there and link it on readme to ensure good experience.

@arpit2006 arpit2006 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Create folder and add it there

@arpit2006

Copy link
Copy Markdown
Collaborator

@CodeSparks45

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

Labels

assigned backend Backend issues checks-passed documentation Improvements or additions to documentation good first issue Good for newcomers mentor-review PR-review SSoC26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: Update Backend README to Reflect Current Database Schema

2 participants