Skip to content

CHANGELOG

v0.19.1 (2025-04-30)

Bug Fixes

v0.19.0 (2025-04-30)

Features

  • cicd: Integrate tox for py3.{10,11,12,13} validation in cicd (#75, efe0c88)

  • refactor: rm .python-version

  • chore: Remove poc

  • feat: Integrate tox for multiple Python versions

  • feat(cicd): Add tox action(s) for testing with multiple versions

  • fix: Potential fix for code scanning alert no. 6: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI 62310815+github-advanced-security[bot]@users.noreply.github.com

Signed-off-by: kmbhm1 kmbhm1@gmail.com

  • fix: Failing dependency install

  • fix: Remove dev dependency installation from multi-version tests

  • fix: Quotes in pip instal

  • chore: Update poetry lock


v0.18.3 (2025-04-28)

Bug Fixes

  • security: Limit GitHub Actions workflow permissions (#74, 7465830)

Adds explicit read-only permissions to the build job in python-publish.yml to follow least privilege principle and address GitHub security alert.

v0.18.2 (2025-04-28)

Bug Fixes

  • Bug Annotated imported incorrectly (#73, 41f911c)

  • fix: Incorrect Annotated addition * test: Add test for condition

v0.18.1 (2025-04-19)

Documentation

v0.18.0 (2025-04-17)

Features

  • Add enum types for BaseModels (#70, b4c060e)

  • feat: Add enum types for BaseModels * feat: Add --no-enums cli argument * feat: Add enum example article * test: Add testing for enum generation * refactor: typing issues * fix: Type check error

v0.17.4 (2025-03-15)

Bug Fixes

  • deps: Update Jinja2 to ^3.1.6 to resolve security vulnerabilities (#68, 7a263bc)

v0.17.3 (2025-03-07)

Bug Fixes

  • Update Jinja2 to ^3.1.6 to address security vulnerability (#67, add28df)

v0.17.2 (2025-02-21)

Bug Fixes

  • types: Generate correct types for ONE_TO_ONE relationships (#66, e889eb3)

  • fix: Debug logging * feat(marshalers): improve foreign key analysis and cross-schema handling

  • Add comprehensive test suite for add_foreign_key_info_to_table_details - Enhance debug logging with guidance for cross-schema references - Keep foreign keys even when target table is in another schema - Ensure proper relationship type detection for Pydantic model generation

This improves support for cross-schema relationships (e.g., public.users -> auth.users) while maintaining correct type generation in Pydantic models.

v0.17.1 (2025-02-21)

Bug Fixes

  • models: Correct foreign key relationship types and field names (#65, 368b557)

Generate appropriate types for relationship fields based on cardinality: - ONE_TO_ONE -> single instance (Type | None) - ONE_TO_MANY -> list of instances (list[Type] | None) - MANY_TO_MANY -> list of instances (list[Type] | None)

This fixes issues where: - All relationships were incorrectly generated as lists - Field names were incorrectly using 'ids' suffix - Multiple fields had naming collisions - Referenced table names were inconsistently included

refactor: consolidate tooling and improve logging - Replace isort with ruff for import sorting - Enhance CLI logging with proper configuration - Improve Makefile documentation and organization

v0.17.0 (2025-02-16)

Features

  • Differentiate between insert, update, and select models (#63, 372aaad)

  • refactor(pydantic): improve foreign key and relationship field generation

  • Keep original column names for foreign keys (e.g., author_id: User) - Use inflection library for proper pluralization in many relationships - Fix handling of tables with relationships but no foreign keys - Add comprehensive tests for pluralization cases

This change ensures more accurate model generation that better reflects the database schema while maintaining proper type hints based on relationship types (ONE_TO_ONE, ONE_TO_MANY, MANY_TO_MANY).

  • style: organize imports and format code

  • Sort and group imports according to PEP8 - Remove unused imports - Fix line spacing and indentation

  • fix(sqlalchemy): standardize newline formatting in model generation

  • Remove extra newline after tablename in write_docs method - Adjust newlines between sections in model output: - Single newline after tablename - Single newline between columns - Single newline before section headers - Double newline between classes - Update test assertions to match new formatting

  • test(cli): fix schema handling in CLI test cases

  • Add proper schema parameter to CLI command invocations - Fix mock table dictionary and jobs configuration - Improve test coverage for empty schema scenarios - Simplify test setup by removing redundant configurations

  • fix: line length error

  • fix(deps): correct supabase package name in pre-commit config

  • style: break long line in sqlalchemy writer

  • fix(writers): use RelationshipInfo objects for relationships

  • feat(models): add Insert and Update model variants

  • Add Insert and Update model variants for each table with appropriate field optionality - Add --no-crud-models flag to disable generation of Insert/Update models - Add smoke-test target to Makefile for quick testing

Changes: - Add is_identity and related properties to ColumnInfo for tracking auto-generated columns - Update SQL query to fetch identity_generation information - Enhance WriterClassType enum with INSERT and UPDATE types - Group field property comments in Insert models for better readability - Add ruff check --fix to remove unused imports in generated files

This change makes it easier to use the generated models in CRUD operations by: 1. Making auto-generated fields optional in Insert models 2. Making all fields optional in Update models 3. Adding clear documentation about field properties


... and so on. For the full changelog, please see the releases page.