fix(models): add missing theme_id FK to Project model#62
Conversation
theme_service.py and project_service.py both reference Project.theme_id but the column was never defined. Adds the FK to themes.id (nullable) and the corresponding theme relationship. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CI Feedback 🧐A test triggered by this PR failed. Here is an AI-generated analysis of the failure:
|
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||
User description
Summary
theme_idFK column toProjectmodel (referencesthemes.id, nullable)themerelationship onProject🤖 Generated with Claude Code
PR Type
Bug fix
Description
Adds missing
theme_idforeign key column to Project modelEstablishes relationship between Project and Theme entities
Resolves runtime errors in theme-related API endpoints
Diagram Walkthrough
File Walkthrough
project.py
Add theme_id FK and relationship to Projectjournal-platform-backend/app/models/project.py
theme_idcolumn as nullable foreign key referencingthemes.idthemerelationship property to enable access to related Themeobjects