Skip to content

Releases: tortoise/tortoise-orm

0.19.2

11 Jul 09:39

Choose a tag to compare

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

20 May 04:49

Choose a tag to compare

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

27 Mar 14:50

Choose a tag to compare

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

10 Jan 12:56
4591ac2

Choose a tag to compare

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

20 Dec 08:29
40dc8b7

Choose a tag to compare

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

06 Oct 15:38

Choose a tag to compare

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

31 Aug 09:26

Choose a tag to compare

  • 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

26 Jul 08:51

Choose a tag to compare

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

0.17.5

07 Jul 02:28

Choose a tag to compare

  • Set field_type of fk and o2o same to which relation field type. (#443)
  • Fix error sql for .sql() call more than once. (#796)
  • Fix incorrect splitting of the import route when using Router (#798)
  • Fix filter error after annotate with F. (#806)
  • Fix select_related for reverse relation. (#808)

0.17.4

03 Jun 03:48

Choose a tag to compare

  • Quick fix update_or_create. (#782)