Releases: tortoise/tortoise-orm
Releases · tortoise/tortoise-orm
0.20.1
Added
- Add binary compression support for
UUIDField
inMySQL
. (#1458) - Only
Model
,Tortoise
,BaseDBAsyncClient
,__version__
, andconnections
are now exported fromtortoise
- Add parameter
validators
topydantic_model_creator
. (#1471)
Fixed
- Fix order of fields in
ValuesListQuery
when it has more than 10 fields. (#1492) - Fix pydantic v2 pydantic_model_creator nullable field not optional. (#1454)
- Fix pydantic v2.5 unittest error. (#1535)
- Fix pydantic_model_creator
exclude_readonly
parameter not working. - Fix annotation propagation for non-filter queries. (#1590)
0.20.0
Added
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
ofpydantic_model_creator
is renamed tomodel_config
. - Attr
config_class
ofPydanticMeta
is renamed tomodel_config
.
0.19.3
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
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
0.19.0
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
forpostgres
.
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 totortoise.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
0.18.0
Added
- Add Case-When support. (#943)
- Add
Rand
/Random
function in contrib. (#944) - Add
ON CONFLICT
support inINSERT
statements. (#428)
Fixed
Changed
- Move
Function
,Aggregate
fromfunctions.py
toexpressions.py
. (#943) - Move
Q
fromquery_utils.py
toexpressions.py
. - Replace
python-rapidjson
toorjson
.
Removed
- Remove
asynctest
and useunittest.IsolatedAsyncioTestCase
. (#416) - Remove
py37
support in tests. - Remove
green
andnose2
test runner.
0.17.8
Added
- Add
Model.raw
method to support the raw sql query. - Add
QuerySet.bulk_update
method. (#924) - Add
QuerySet.in_bulk
method. - Add
MaxValueValidator
andMinValueValidator
(#927)
Fixed
- Fix
QuerySet
subclass being lost when_clone
is run on the instance. - Fix bug in
.values
withsource_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
0.17.7
- Fix
select_related
behaviour for forward relation. (#825) - Fix bug in nested
QuerySet
andManager
. (#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 totortoise.db_client
. - Add
indexes
toModel.describe
.