lecaillon / Evolve

Database migration tool for .NET and .NET Core projects. Inspired by Flyway.
https://evolve-db.netlify.com
MIT License
846 stars 112 forks source link

Let Evolve Run some custom bash or powershell script #92

Open guy-lud opened 5 years ago

guy-lud commented 5 years ago

Hi,

I know that Evolve is mainly for DB migration, yet some times there is need to execute some code (via script or what ever) once as part of a migration.

I think it would be nice feature in Evolve.

WDYT ?

lecaillon commented 5 years ago

I don't know, not sure about it. Can you give me a example, which can lead to a more precise need ?

majkinetor commented 5 years ago

This would be great to have for multiple reasons.

There might be some specific things to do during the migration that are not easily done without a script and are easy enought to do in script without fireing up full blown programming language and IDE.

Examples:

All above could be done in just several lines of shell script.

Furthremore, being able to just ad ad hoc stuff into Powershell script along with migration would be epic, likely with an easy way to access migration config such as db name and service (via script parameters, env. vars etc.).

Options could include:

I honestly wouldn't consider using migration tool without such thing and if doesn't exist I would create shell wrapper of the original tool that provides such behavior on top of it, however, that is certainly less capable solution then integrated one.

mfedatto commented 4 years ago

Well, I can't see why it should be considered a part of a migration process, but I understand it would be awesome to have a tool analog to a migration to run shell scripts.

lecaillon commented 3 years ago

I'm finally thinking about adding this kind of feature to Evolve. Give the possibility to run powershell on Windows, Bash on Linux at some specific points of the Evolve execution workflow. Something like :

If you have any idea about this subject, don't hesitate to post a comment