tortoise / tortoise-orm

Familiar asyncio ORM for python, built with relations in mind
https://tortoise.github.io
Apache License 2.0
4.37k stars 355 forks source link

feat: support primary_key/db_index and mark pk/index as deprecated #1621

Closed waketzheng closed 1 month ago

waketzheng commented 1 month ago

Description

Fixes TODOs in tortoise/fields/base.py

Motivation and Context

Rename Field argument pk/index to primary_key/db_index

How Has This Been Tested?

make ci && cd examples/fastapi && pytest _tests.py && cd ../blacksheep && pytest _tests.py

Checklist:

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9189406969

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
tortoise/contrib/mysql/fields.py 0 1 0.0%
tortoise/fields/base.py 21 23 91.3%
<!-- Total: 35 38 92.11% -->
Files with Coverage Reduction New Missed Lines %
tortoise/fields/data.py 1 94.88%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 9189055236: -0.002%
Covered Lines: 5763
Relevant Lines: 6462

💛 - Coveralls