tortoise / aerich

A database migrations tool for TortoiseORM, ready to production.
https://github.com/tortoise/aerich
Apache License 2.0
823 stars 93 forks source link

Table rename: No changes detected #139

Closed Olegt0rr closed 3 years ago

Olegt0rr commented 3 years ago

How to reproduce

1. Create model User without setting custom table name.

class User(Model):
    id = IntField(pk=True)

2. Init db / create migrations.

Table name is user

3. Change table name for User model

class User(Model):
    id = IntField(pk=True)

    class Meta:
        table = "users"

4. Try to create migrations

No changes detected, but table name was changed!

long2ice commented 3 years ago

That should be fixed