Tortoise-orm

Latest version: v0.20.1

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

Scan your dependencies

Page 15 of 23

0.13.1

Not secure
------
* Model schema now has a discovery API:

One can call ``Tortoise.describe_models()`` or ``Tortoise.describe_model(<Model>)`` to get
a full description of the model(s).

Please see :meth:`tortoise.Tortoise.describe_model` and :meth:`tortoise.Tortoise.describe_models` for more info.

- Fix in generating comments for Foreign Keys in ``MySQL``
- Added schema support for PostgreSQL. Either set ``"schema": "custom"`` var in ``credentials`` or as a query parameter ``?schema=custom``
- Default MySQL charset to ``utf8mb4``. If a charset is provided it will also force the TABLE charset to the same.

0.13

====

0.13.0

Not secure
------
.. warning::
**This release brings with it, deprecation of Python 3.5:**

We will increase the minimum supported version of Python to 3.6,
as 3.5 is reaching end-of-life,
and is missing many useful features for async applications.

We will discontinue Python 3.5 support on the next major release (Likely 0.14.0)

New Features:
^^^^^^^^^^^^^
- Example Sanic integration along with register_tortoise hook in contrib (163)
- ``.values()`` and ``.values_list()`` now default to all fields if none are specified.
- ``generate_schema()`` now generates well-formatted DDL SQL statements.
- Added ``TruncationTestCase`` testing class that truncates tables to allow faster testing of transactions.
- Partial saves are now supported (157): ``obj.save(update_fields=['model','field','names'])``

Bugfixes:
^^^^^^^^^
- Fixed state leak between database drivers which could cause incorrect DDL generation.
- Fixed missing table/column comment generation for ``ForeignKeyField`` and ``ManyToManyField``
- Fixed comment generation to escape properly for ``SQLite``
- Fixed comment generation for ``PostgreSQL`` to not duplicate comments
- Fixed generation of schema for fields that defined custom ``source_field`` values defined
- Fixed working with Models that have fields with custom ``source_field`` values defined
- Fixed safe creation of M2M tables for MySQL dialect (168)

Docs/examples:
^^^^^^^^^^^^^^
- Examples have been reworked:

- Simplified init of many examples
- Re-did ``generate_schema.py`` example
- A new ``relations_recirsive.py`` example (turned into test case)

- Lots of small documentation cleanups


.. rst-class:: emphasize-children

0.12.7

Not secure
------------------
- Support connecting to PostgreSQL via Unix domain socket (simple case).
- Self-referential Foreign and Many-to-Many keys are now allowed

0.12.6

Not secure
---------------
* Handle a ``__models__`` variable within modules to override the model discovery mechanism.

If you define the ``__models__`` variable in ``yourapp.models`` (or wherever you specify to load your models from),
``generate_schema()`` will use that list, rather than automatically finding all models for you.

- Split model constructor into from-Python and from-DB paths, leading to 15-25% speedup for large fetch operations.
- More efficient queryset manipulation, 5-30% speedup for small fetches.

0.12.5

Not secure
------
- Using non registered models or wrong references causes an ConfigurationError with a helpful message.

Page 15 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.