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

Rename on field add #134

Closed Olegt0rr closed 3 years ago

Olegt0rr commented 3 years ago

On field add aerich asks to rename existing field (event it's not marked to delete)

Example

State 1

class User(Model):
    first_name = CharField(max_length=255)

State 2

class User(Model):
    first_name = CharField(max_length=255)
    last_name = CharField(max_length=255)

Run aerich migrate

Rename first_name to last_name? [True]

long2ice commented 3 years ago

Fixed, thanks to report!