Search code examples
sqlitepeewee

Peewee: Is there a concept for implementing database evolutions?


Is there a way to support database evolutions with Peewee and SQLite? The use-case is I have a database in production which was generated with Peewee. After some time I come up with some model deltas and the only way I see to introduce these schema changes is to recreate the schema from scratch and manually apply the delta to the production database.

Scala Play and Play-Slick, for example, help generate only the delta you need in a non destructive fashion to apply to an existing schema.


Solution

  • The documentation provides information about schema migrations with Peewee:

    http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#migrate