Skip to content

Releases: tortoise/tortoise-orm

0.16.18

16 Nov 13:17
Compare
Choose a tag to compare
  • Support custom function in update. (#537)
  • Add Model.refresh_from_db. (#549)
  • Add timezone support, be careful to upgrade to this version, see docs for details. (#335)
  • Remove aerich in case of cyclic dependency. (#558)

0.16.17

23 Oct 16:37
Compare
Choose a tag to compare
  • Add on_delete in ManyToManyField. (#508)
  • Support F expression in annotate. (#475)
  • Fix QuerySet.select_related in case of join same table twice. (#525)
  • Integrate Aerich into the install. (#530)

0.16.16

24 Sep 14:42
Compare
Choose a tag to compare
  • Fixed inconsistency in integrity error exception of FastAPI
  • add OSError to _get_comments except block

v0.16.15

16 Sep 09:16
Compare
Choose a tag to compare
  • Make DateField accept valid date str.
  • Add QuerySet.select_for_update().
  • check default for not None on pydantic model creation
  • propagate default to pydantic model
  • Add QuerySet.select_related().
  • Add custom attribute name for Prefetch instruction.
  • Add db_constraint for RelationalField family.

v0.16.14

25 Jul 13:21
Compare
Choose a tag to compare
  • We now do CI runs on a Windows VM as well, to try and prevent Windows specific regressions.
  • Make F expression work with QuerySet.filter().
  • Include py.typed in source distribution.
  • Added datetime parsing from int for fields.DatetimeField.
  • get_or_create passes the using_db= on if provided.
  • Allow custom loop and connection_class parameters to be passed on to asyncpg.

v0.16.13

02 Jun 14:54
Compare
Choose a tag to compare
  • Default install of tortoise-orm now installs with no C-dependencies, if you want to use the C accelerators, please do a pip install tortoise-orm[accel] instead.
  • Added <instance>.clone() method that will create a cloned instance in memory. To persist it you still need to call .save()
  • .clone() will raise a ParamsError if tortoise can't generate a primary key. In that case do a .clone(pk=<newval>)
  • If manually setting the primary key value to None and the primary key can be automatically generated, this will create a new record. We however still recommend the .clone() method instead.
  • .save() can be forced to do a create by setting force_create=True
  • .save() can be forced to do an update by setting force_update=True
  • Setting update_fields for a .save() operation will strongly prefer to do an update if possible

v0.16.12

22 May 16:01
Compare
Choose a tag to compare
  • Make Field.default effect on db level when generate table
  • Add converters instead of importing from pymysql
  • Fix PostgreSQL BooleanField default value convertion
  • Fix JSONField typed in pydantic_model_creator
  • Add .sql() method on QuerySet

v0.16.11

14 May 06:31
Compare
Choose a tag to compare
  • fix: sqlite://:memory: in Windows thrown OSError: [WinError 123]
  • Support bulk_create() insertion of records with overridden primary key when the primary key is DB-generated
  • Add queryset.exists() and Model.exists().
  • Add model subscription lookup, Model[<pkval>] that will return the object or raise KeyError

v0.16.10

30 Apr 11:01
Compare
Choose a tag to compare
  • Fix bad import of basestring
  • Better handling of NULL characters in strings. Fixes SQLite, raises better error for PostgreSQL.
  • Support .group_by() with join now

v0.16.9

26 Apr 19:56
Compare
Choose a tag to compare
  • Support F expression in .save() now
  • IntEnumField accept valid int value and CharEnumField accept valid str value
  • Pydantic models get created with globally unique identifier
  • Leaf-detection to minimize duplicate Pydantic model creation
  • Pydantic models with a Primary Key that is also a raw field of a relation is now not hidden when exclude_raw_fields=True as it is a critically important field
  • Raise an informative error when a field is set as nullable and primary key at the same time
  • Foreign key id's are now described to have the positive-integer range of the field it is related to
  • Fixed prefetching over OneToOne relations
  • Fixed __contains for non-text fields (e.g. JSONB)