Better support for procedure/function migrations.
Migrations of procedures/functions are not done as delta migrations, but as a drop & create (replace) statements. For this reason, it's really hard to track the changes - since there are many "copies" of the function and git diff doesn't visualize the different between these coppies.
I propose introducing support for a file, which may be modified and would be deployed (executed) if the hash changes. The usage of this behaviour would have only one restriction - the procedure/function cannot be used in migration. (In such case, the migration would have to "copy" the "old" function to custom temporary function.)
I agree with the problem, but not so much with the proposed solution. I think that better solution is to have a single directory where you store the procedures and a command which generates migrations if anything in the directory changes.
What is the added value with your solution? The needed "sync" step is imo a downside.
You can auto sync when calling continue, if the sync step is too annoying. The added value is that the core (both in sense of ideas and actual code) of migrations remains intact.
It seems to me that it's musch easier to run there two commands than arguing about implementation in nextras:
php console.php migrations:continue
psql databasename < migrations/plfunctions.sql
We may introduce
php console.php migrations:import