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

[Bug] Failed to set schema for models.Model #1646

Open deeklming opened 2 weeks ago

deeklming commented 2 weeks ago

Describe the bug Failed to set schema for models.Model in postgresql.

To Reproduce

from tortoise import fields, models
class Tt(models.Model):
    id = fields.IntField(primary_key=True)
    username = fields.CharField(max_length=20, unique=True)

    class Meta:
        schema = 'auth'

Expected behavior All tables are created in the public scheme of postgresql. Please check it.