Migrations with User-Defined Functions

I'm working on a very data-intensive application where we use a lot of user-defined functions to keep things performant and consistent.

So far, every time we want to change one of these functions, we've defined a new custom migration with the full content of the function. This works, but it makes it very hard to see and review the changes in pull requests.

Does anyone have a good solution for this?
Was this page helpful?