I'm trying to use aerich with tortoise to manage migration with sqlite.
And when I aerich upgrade after aerich migrate --name some_migration(this seemed successfully created a migration file), I got this error.
tortoise.exceptions.OperationalError: column <some column> of relation <some table> does not exist
What I have changed was just deleting a column to test.
from tortoise.models import Model
from tortoise import fields
class User(Model):
id = fields.IntField(pk=True)
username = fields.CharField(50, unique=True, null=False)
# some_column = fields.CharField(50, null=False) # just delete this one to check if migration works
The migration file looks like this.
-- upgrade --
ALTER TABLE "user" DROP COLUMN "some_column";
-- downgrade --
ALTER TABLE "user" ADD "some_column" VARCHAR(50) NOT NULL;
Could someone help me on this?