Sqlacodegen

Latest version: v3.0.0

Safety actively analyzes 723144 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

3.0.0

- Dropped support for Python 3.8
- Changed nullable relationships to include ``Optional`` in their type annotations
- Fixed SQLModel code generation
- Fixed two rendering issues in ``ENUM`` columns when a non-default schema is used: an
unwarranted positional argument and missing the ``schema`` argument
- Fixed ``AttributeError`` when metadata contains user defined column types
- Fixed ``AssertionError`` when metadata contains a column type that is a type decorator
with an all-uppercase name
- Fixed MySQL ``DOUBLE`` column types being rendered with the wrong arguments

3.0.0rc5

- Fixed pgvector support not working

3.0.0rc4

- Dropped support for Python 3.7
- Dropped support for SQLAlchemy 1.x
- Added support for the ``pgvector`` extension (with help from KellyRousselHoomano)

3.0.0rc3

- Added support for SQLAlchemy 2 (PR by rbuffat with help from mhauru)
- Renamed ``--option`` to ``--options`` and made its values delimited by commas
- Restored CIText and GeoAlchemy2 support (PR by stavvy-rotte)

3.0.0rc2

- Added support for generating SQLModel classes (PR by Andrii Khirilov)
- Fixed code generation when a single-column index is unique or does not match the
dialect's naming convention (PR by Leonardus Chen)
- Fixed another problem where sequence schemas were not properly separated from the
sequence name
- Fixed invalid generated primary/secondaryjoin expressions in self-referential
many-to-many relationships by using lambdas instead of strings
- Fixed ``AttributeError`` when the declarative generator encounters a table name
already in singular form when ``--option use_inflect`` is enabled
- Increased minimum SQLAlchemy version to 1.4.36 to address issues with ``ForeignKey``
and indexes, and to eliminate the PostgreSQL UUID column type annotation hack

3.0.0rc1

- Migrated all packaging/testing configuration to ``pyproject.toml``
- Fixed unwarranted ``ForeignKey`` declarations appearing in column attributes when
there are named, single column foreign key constraints (PR by Leonardus Chen)
. Fixed ``KeyError`` when rendering an index without any columns
- Fixed improper handling of schema prefixes in sequence names in server defaults
- Fixed identically named tables from different schemas resulting in invalid generated
code
- Fixed imports caused by ``server_default`` conflicting with class attribute names
- Worked around PostgreSQL UUID columns getting ``Any`` as the type annotation

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.