Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
May 22, 2024

Conversation

waketzheng
Copy link
Contributor

@waketzheng waketzheng commented May 22, 2024

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:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@coveralls
Copy link

coveralls commented May 22, 2024

Pull Request Test Coverage Report for Build 9189406969

Details

  • 35 of 38 (92.11%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.002%) to 87.88%

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%
Files with Coverage Reduction New Missed Lines %
tortoise/fields/data.py 1 94.88%
Totals Coverage Status
Change from base Build 9189055236: -0.002%
Covered Lines: 5763
Relevant Lines: 6462

💛 - Coveralls

@waketzheng waketzheng changed the title feat: support primary_key/db_index and mark pk/index as deprecate feat: support primary_key/db_index and mark pk/index as deprecated May 22, 2024
@abondar abondar merged commit aea4c83 into tortoise:develop May 22, 2024
7 checks passed
@waketzheng waketzheng deleted the pk2primary_key branch June 11, 2024 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants