pradosoft / prado

Prado - Component Framework for PHP
Other
187 stars 70 forks source link

Shell Migration Action for upgrades #932

Open belisoful opened 1 year ago

belisoful commented 1 year ago

A Migration Action would be nice to have. It could automatically clear the caches as part of the upgrade.

There are some upgrades to the Cron Database in cron v2 and it would be awesome if there was a Migration shell CLI action for it, or at least outputting the needed upgrade sql. Executing the SQL should be optional, maybe after the user types "yes". Maybe there could be other DB Connection credentials entered as part of the process (for higher permissions )

belisoful commented 1 year ago

After reviewing the Yii2 migration shell command, they've put a LOT of work into it. Up, down, reset, roll back, etc. Very well done. I don't have the time (yet) for such advanced mechanics. There are a few other things I have on my plate than migration manager.

I do think that the start of a migration manager is in the realm of possible though, especially for the cron v2 update that will require a few new fields in the DB.

The simple way is to just print the SQL commands for upgrades to the screen and let the admins upgrade the database, to start. Also print the downgrade SQL commands.