tortoise / tortoise/tortoise-orm

Allow setting collate on fields

Open
#686 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
5.6k
Forks
516
Avg merge
2d 21h
Merged PRs (30d)
9

Description

Is your feature request related to a problem? Please describe.
In SQLite, I can make a text field have a collate of NOCASE, but I don't know how to do that in Tortoise. I tried searching the docs, but there seems to be no way to make a field have a collate of NOCASE, only do case-insensitive matches on SELECT, which is not what I want.

Describe the solution you'd like
Collates to be supported.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating how Tortoise field metadata and SQLite schema definitions are represented. Done means a model field can declare the NOCASE collation and the resulting database behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, sqlite
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.