peewee_migrate icon indicating copy to clipboard operation
peewee_migrate copied to clipboard

What about the DB creation?

Open paulocheque opened this issue 8 years ago • 1 comments

If we use Peewee without peewee_migrate, we would just execute this: db.create_tables([Model1, Model2])

So, if we use peewee_migrate, we should avoid this command and only use peewee_migrate, right?

Also, does Peewee_Migrate use Peewee (http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#migrate) for migrations, right? Any doc about how to create the migration files?

Thanks

paulocheque avatar Mar 10 '17 23:03 paulocheque

So, if we use peewee_migrate, we should avoid this command and only use peewee_migrate, right?

basically yes... but it's not completely needed on the first create of the database, for future migrations you should stick to peewee-migrate.

Also, does Peewee_Migrate use Peewee [...] for migrations, right?

yes, peewee-migrate uses the migration features of peewee playhouse.

Any doc about how to create the migration files?

could you atleast read the readme.md? you can create a blank migration file with pw_migrate create. the available functions are listed in the blank migration file and work pretty much like the migrate functions of playhouse.

Thorbijoern avatar Apr 20 '18 11:04 Thorbijoern