Skip to content

Conversation

GabrielVGS
Copy link
Owner

Pull Request

Description

Updates database image versions in Docker Compose files and improves default value handling for primary keys in the SQLModel base class.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Refactoring (no functional changes)
  • Test improvements
  • CI/CD improvements
  • Other: Database stability improvement

Related Issue

Fixes #(issue number)

Changes Made

  • Updated db service in docker-compose.yml from postgres:18rc1-alpine3.22 to stable postgres:18 image
  • Updated db-test service in ops/docker-compose.test.yml to use stable postgres:18 image
  • Added server_default for primary key field in fastapi-base/src/models/base.py to use uuid7() function at database level
  • Improved UUID generation reliability and consistency by moving generation to database level

Testing

  • Unit tests pass (make test)
  • Integration tests pass
  • Manual testing completed
  • New tests added for new functionality

Test Results:

# Paste test results here if relevant

Code Quality

  • Pre-commit hooks pass (make precommit-run)
  • Code follows project style guidelines
  • Type hints added where applicable
  • Docstrings added/updated for public APIs

Database Changes

  • No database changes
  • New migration created (make alembic-make-migrations)
  • Migration tested locally
  • Migration is backward compatible
  • Database schema documented

Breaking Changes

  • No breaking changes
  • Breaking changes documented below

Breaking Changes Details:

N/A - These changes maintain backward compatibility while improving stability

Documentation

  • No documentation needed
  • README.md updated
  • API documentation updated
  • Architecture documentation updated
  • Contributing guidelines updated

Deployment

  • No deployment changes needed
  • Environment variables added/changed (documented in PR)
  • Docker configuration updated
  • Dependencies added/updated

Screenshots (if applicable)

Checklist

  • I have read the Contributing Guidelines
  • My code follows the code style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Notes

This PR focuses on stability improvements by:

  1. Moving from PostgreSQL release candidate to stable version for better reliability
  2. Standardizing database versions across development and test environments
  3. Improving UUID generation by leveraging database-level defaults for better consistency

The changes should reduce potential compatibility issues and improve overall system reliability without affecting existing functionality.

@GabrielVGS GabrielVGS added the enhancement New feature or request label Sep 26, 2025
@GabrielVGS GabrielVGS merged commit 4b43645 into dev Sep 26, 2025
@GabrielVGS GabrielVGS deleted the postgres18-refactor branch September 26, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant