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 11 of 23

0.15.7

Not secure
------
- ``QuerySet.Update()`` now returns the count of the no of rows affected. Note, that
- ``QuerySet.Delete()`` now returns the count of the no of rows deleted.
- Note that internal API of ``db_connection.execute_query()`` now returns ``rows_affected, results``. (This is informational only)
- Added ``get_or_none(...)`` as syntactic sugar for ``filter(...).first()``

0.15.6

Not secure
------
- Added ``BinaryField`` for storing binary objects (``bytes``).
- Changed ``TextField`` to use ``LONGTEXT`` for MySQL to allow for larger than 64KB of text.
- De-duplicate index if specified on both ``index=true`` and as part of ``indexes``
- Primary Keyed ``TextField`` is marked as deprecated.
We can't guarantee that it will be properly indexed or unique in all cases.
- One can now disable the backwards relation for FK/O2O relations by passing ``related_name=False``
- One can now pass a PK value to a generated field, and Tortoise ORM will use that as the PK as expected.
This allows one to have a model that has a autonumber PK, but setting it explicitly if required.

0.15.5

Not secure
------
* Refactored Fields:

Fields have been refactored, for better maintenance. There should be no change for most users.

- More accurate auto-completion.
- Fields now contain their own SQL schema by dialect, which significantly simplifies adding field types.
- ``describe_model()`` now returns the DB type, and dialect overrides.

- ``JSONField`` will now automatically use ``python-rapidjson`` as an accelerator if it is available.
- ``DecimalField`` and aggregations on it, now behaves much more like expected on SQLite (256)
- Check whether charset name is valid for the MySQL connection (261)
- Default DB driver parameters are now applied consistently, if you use the URI schema or manual.

0.15.4

Not secure
------
- Don't generate a schema if there is no models (254)
- Emit a ``RuntimeWarning`` when a module has no models to import (254)
- Allow passing in a custom SSL context (255)

0.15.3

Not secure
------
* Added ``OneToOneField`` implementation:

``OneToOneField`` describes a one to one relation between two models.
It can be set from the primary side only, but resolved from both sides in the same way.

``describe_model(...)`` now also reports OneToOne relations in both directions.

Usage example:

.. code-block:: python3

event: fields.OneToOneRelation[Event] = fields.OneToOneField(
"models.Event", on_delete=fields.CASCADE, related_name="address"
)

- Prefetching is done concurrently now, sending all prefetch requests at the same time instead of in sequence.
- Enable foreign key enforcement on SQLite for builds where it was optional.

0.15.2

Not secure
------
- The ``auto_now_add`` argument of ``DatetimeField`` is handled correctly in the SQLite backend.
- ``unique_together`` now creates named constrains, to prevent the DB from auto-assigning a potentially non-unique constraint name.
- Filtering by an ``auto_now`` field doesn't replace the filter value with ``now()`` anymore.

Page 11 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.