Old schema:
CREATE OR REPLACE FUNCTION somefunction(
param1 text
)
[...]
New schema:
CREATE OR REPLACE FUNCTION somefunction(
param2 uuid
)
[...]
Generated migration:
CREATE OR REPLACE FUNCTION somefunction(
param2 uuid
)
Which results in the migration failing since postgres disallows changing types of params of functions, the migration should first drop the old function before creating the new one. This also includes the return type.