-
Model:
```py
class Shop(Model):
id = fields.BigIntField(pk=True, index=True)
price = fields.BigIntField()
```
Code:
```py
async def run():
await Tortoise.init(db_url=f"postgres://…
-
A way to generate [data models diagrams](https://en.wikipedia.org/wiki/Data_model) from tortoise model hierarchies. UML makes most sense considering it is a language.
-
Attempting to generate DB migrations for #132 fails to find any difference. I am starting to wonder if `aerich` is even worth using, or if there are any better options. Looking at the github page, i…
-
I have the following pydantic schema:
# Paciente has several fields but I only want this two
paciente_out_all = pydantic_model_creator(Paciente, include=('id', 'departments'))`
**d…
-
**Describe the bug**
Inability to serialise a field of type `CharEnumField` due to ValidationError
**To Reproduce**
Example:
```python
## Lets say we have a Enum like such:
class ProfilePrivac…
-
**Describe the bug**
Can't query by blob fields, can't update blob values.
**To Reproduce**
```python
from tortoise import Tortoise, fields, run_async
from tortoise.models import Model
cla…
-
**Is your feature request related to a problem? Please describe.**
Whenever I declare a field as fields.JSONFields and use it in a pydantic model by calling pydantic model creator it comes as string …
-
**Describe the bug**
This bug appears when multiple conditions are met:
1. DB backend is postgresql
2. Function containing `get_or_create` call is wrapped with `in_transaction`
3. This function is…
-
**Describe the bug**
Method of saving data using tortoise ORM:
await XXX.save()
Then errors will be reported in the execution process, not every time. It is an accidental phenomenon.
The version…
-
**Describe the bug**
Given the model with foreignKey:
`Toy --(builder)--> Person`
With related name:
`Person --(toys_built) --> Toy`
Defined with this code:
```
class Toy(tortoise.m…