go-morph / morph

Other
18 stars 1 forks source link

Support multiple drivers when generating migrations #40

Open koox00 opened 2 years ago

koox00 commented 2 years ago

More of a proposition, since morph supports multiple drivers, it would be nice to be able to generate migration files for multiple drivers in one command.

e.g:

morph generate create_users --drivers mysql,postgres --dir ./foo
agnivade commented 2 years ago

Just a nit on the flag design: it might be cleaner to have multiple flag instances like --driver mysql --driver postgres instead. @isacikgoz - WDYT?

isacikgoz commented 2 years ago

Hmm.. Rather than having conflicting flags, we should only use one flag. It can be either single or multiple. Both works for me.

agnivade commented 2 years ago

Can you clarify what you mean by conflicting flags?

isacikgoz commented 2 years ago

I mean --driver and --drivers would essentially be the same flag. I think we should choose only one.

agnivade commented 2 years ago

Oh I totally missed that the flag name was different. Yeah I'd go with multiple instances of --driver just to avoid a breaking change with the flag name. 0/5 though.

koox00 commented 2 years ago

I mean --driver and --drivers would essentially be the same flag. I think we should choose only one.

yes yes, I wasn't thinking of changing the flag to --drivers, consider it a typo