Open cubranic opened 6 years ago
Is there no way to make new tables?
I suppose it's part of the core Database/Model API (http://docs.peewee-orm.com/en/latest/peewee/models.html#creating-model-tables):
# Connect to our database.
db.connect()
# Create the tables.
db.create_tables([User, Tweet])
It would be nice to be versioned, though. Maybe we should get some clarification from Peewee's author?
Ah, so the schema-migration module just provides the SQL metadata-altering statements not in base peewee. That makes sense.
My reading of the playhouse docs is that schema versioning is left to the user, which I think is fine.
And there is this third-party project to provide a "real" migrations framework for Peewee: https://github.com/klen/peewee_migrate
Docs: http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#schema-migrations