[Django]-How do I support an old and new database scheme at the same time in Django?

2👍

Completely different solution, rename object field, but specify old database column name using db_column parameter.

class Foo(models.Model)
    renamed_field = models.BooleanField(db_column='obsolete_field')

No migrations required.

👤vartec

Leave a comment