Victor Hoi

Results 16 comments of Victor Hoi

> Drop `aerich` table in database, rm `migrations` dir then try `init` again. Thank you for your fast reply, @long2ice. I've just done the following: - dropped the aerich table...

> Maybe because your models struct, which say `Can't create schema due to cyclic fk references` Thank you for your reply, @long2ice. We have not seen this error before, so...

> Can you generate db with `Tortoise.generate_schema()` without aerich? Thank you, @long2ice. It does not work there as well, which might suggest that this is a Tortoise ORM issue (which...

We're checking them right now, but isn't it weird that the models have always worked fine, but now, without any changes to them, we're getting this cyclic fk references-error? What...

For example, trying to build the schema using the migration files aerich generated does work correctly (just tested it). Trying to build the schema using `Tortoise.generate_schema()` fails.

> Caused by split to two files? Thank you, @long2ice. How do we format a foreign key if the model is in another file? For example, when we have `models/core.py`...

> Will collect all models content to one file named `old_models.py` and store in db with each version Thanks, @long2ice. Not sure if I follow you here. What is the...

> I'm not clear, could you show your all models? Here they are: `models/core.py` ``` from tortoise import fields, models from tortoise.contrib.pydantic import pydantic_model_creator from typing import List from fastapi...

Did you see any circular fk references in the models I posted, @long2ice? Or is it indeed a bug in aerich? Thanks.

> You can try merge all models to one file @Tears We refactored all our models back to one models file (models/core.py). Unfortunately, we still receive the following error when...