Open vadim-shadrin opened 3 years ago
Could you show full code?
from tortoise.fields import CharField from tortoise import fields from tortoise.models import Model
class FileField(CharField): pass
class Image(TimestampedMixin, Model): id = fields.IntField(pk=True) width = fields.IntField() height = fields.IntField() file = fields.CharField(max_length=255) test = FileField(max_length=64)
If clear database and all migrations every thing is ok. The field created.
I tried to extend field according to documentation. https://tortoise-orm.readthedocs.io/en/latest/fields.html#extending-a-field But aerich.utils.get_tortoise_config() rised en exception. Error: No config named "config.aerich" I do not understand why? In other cases this method called and it does not rise an exception ?