pop icon indicating copy to clipboard operation
pop copied to clipboard

Generate Migrations from Model

Open guxx opened this issue 7 years ago • 4 comments

Hello

Is there a way to generate automatically migrations based on the difference between the models and the database ?

guxx avatar Jul 24 '18 15:07 guxx

Hello @guxx, right now it's not supported, but some help is welcome!

stanislas-m avatar Jul 24 '18 20:07 stanislas-m

How about it works like this?

if you run generate migrate, at first soda checks unapplied migration existing, if there are, generator’ll stop. else it checks the latest database states and if differences have occurred, generates migrations.

$ soda generate fizz

if you want to make empty migrations file, you could run commands with argument --empty like django command,

$ soda generate fizz [migration_name] --empty

or

$ soda generate --emptymigrate

thank you.

zrma avatar Oct 13 '19 23:10 zrma

Any updates regarding this proposal?

Roccoriu avatar Apr 24 '23 17:04 Roccoriu

@Roccoriu no, currently we have no plan on this

sio4 avatar Apr 26 '23 11:04 sio4