Tortoise Orm Versions Save

Familiar asyncio ORM for python, built with relations in mind

0.20.0

8 months ago

Added

  • Allow ForeignKeyField(on_delete=NO_ACTION) (#1393)
  • Support pydantic 2.0. (#1433)

Fixed

  • Fix foreign key constraint not generated on MSSQL Server. (#1400)
  • Fix testcase error with python3.11 (#1308)

Breaking Changes

  • Drop support for pydantic 1.x.
  • Drop support for python 3.7.
  • Param config_class of pydantic_model_creator is renamed to model_config.
  • Attr config_class of PydanticMeta is renamed to model_config.

0.19.3

1 year ago

Added

  • Added config_class option to pydantic model genator that allows the developer to customize the generated pydantic model's Config class. (#1048)

Fixed

  • Fastapi example test not working. (#1029)
  • Fix create index sql error. (#1202)
  • Fix dependencies resolve error. (#1246)
  • Fix ignoring zero value of limit. (#1270)
  • Fix ForeignKeyField is none when fk is integer 0. (#1274)
  • Fix limit ignore zero. (#1270)
  • Fix min/max value validators for decimal fields. (#1291)

0.19.2

1 year ago

Added

  • Added schema attribute to Model's Meta to specify exact schema to use with the model.

Fixed

  • Mixin does not work. (#1133)
  • using_db wrong position in model shortcut methods. (#1150)
  • Fixed connection to Oracle database by adding database info to DBQ in connection string.
  • Fixed ORA-01435 error while using Oracle database (#1155)
  • Fixed processing of ssl option in MySQL connection string.
  • Fixed type hinting for QuerySetSingle.

0.19.1

1 year ago

Added

  • Added Postgres/SQLite partial indexes support. (#1103)
  • Added Microsoft SQL Server/Oracle support, powered by asyncodbc, note that which is not fully tested.
  • Added optional parameter to pydantic_model_creator. (#770)
  • Added using_db parameter to Model shortcut methods. (#1109)

Fixed

  • TimeField for MySQL will return datetime.timedelta object instead of datetime.time object.
  • Fix on conflict do nothing. (#1122)
  • Fix _custom_generated_pk attribute not set in Model._init_from_db method. (#633)

0.19.0

2 years ago

Added

  • Added psycopg backend support.
  • Added a new unified and robust connection management interface to access DB connections which includes support for lazy connection creation and much more. For more details, check out this PR.
  • Added TimeField. (#1054).
  • Added ArrayField for postgres.

Fixed

  • Fix bulk_create doesn't work correctly with more than 1 update_fields. (#1046)
  • Fix bulk_update errors when setting null for a smallint column on postgres. (#1086)

Deprecated

  • Existing connection management interface and related public APIs which are deprecated:
  • Tortoise.get_connection
  • Tortoise.close_connections

Changed

  • Refactored tortoise.transactions.get_connection method to tortoise.transactions._get_connection. Note that this method has now been marked private to this module and is not part of the public API

0.18.1

2 years ago

Added

  • Add on conflict do update for bulk_create. (#1024)

Fixed

  • Fix bulk_create error. (#1012)
  • Fix unittest invalid.
  • Fix bulk_update in postgres with some type. (#968) (#1022)

0.18.0

2 years ago

Added

  • Add Case-When support. (#943)
  • Add Rand/Random function in contrib. (#944)
  • Add ON CONFLICT support in INSERT statements. (#428)

Fixed

  • Fix bulk_update error when pk is uuid. (#986)
  • Fix mutable default value. (#969)

Changed

  • Move Function, Aggregate from functions.py to expressions.py. (#943)
  • Move Q from query_utils.py to expressions.py.
  • Replace python-rapidjson to orjson.

Removed

  • Remove asynctest and use unittest.IsolatedAsyncioTestCase. (#416)
  • Remove py37 support in tests.
  • Remove green and nose2 test runner.

0.17.8

2 years ago

Added

  • Add Model.raw method to support the raw sql query.
  • Add QuerySet.bulk_update method. (#924)
  • Add QuerySet.in_bulk method.
  • Add MaxValueValidator and MinValueValidator (#927)

Fixed

  • Fix QuerySet subclass being lost when _clone is run on the instance.
  • Fix bug in .values with source_field. (#844)
  • Fix contrib.blacksheep exception handlers, use builtin json response. (#914)
  • Fix Indexes defined in Meta class do not make use of exists parameter in their template (#928)

Changed

  • Allow negative values with IntEnumField. (#889)
  • Make .values() and .values_list() awaited return more consistent. (#899)

0.17.7

2 years ago
  • Fix select_related behaviour for forward relation. (#825)
  • Fix bug in nested QuerySet and Manager. (#864)
  • Add Concat function for MySQL/PostgreSQL. (#873)
  • Patch for use_index/force_index mutable problem when making query. (#888)
  • Lift annotation field's priority in make query. (#883)
  • Make use/force index available in select type Query. (#893)
  • Fix all logging to use Tortoise's logger instead of root logger. (#879)
  • Rename db_client logger to tortoise.db_client.
  • Add indexes to Model.describe.

0.17.6

2 years ago
  • Add RawSQL expression.
  • Fix columns count with annotations in _make_query. (#776)
  • Make functions nested. (#828)
  • Add db_constraint in field describe.