Closed pjungwir closed 1 year ago
As we do have other adapters after going through old issues:
https://github.com/teoljungberg/fx/pull/80
Meaning, we need to have this be database-specific if we are going to go forward.
I'll close this PR until that is handled, if we are going to handle it.
If your functions depend on each other, you may wind up with forward references in your
schema.rb
file (even though we order them by oid, e.g. if an older function was refactored to call new functions). Postgres has the same problem inpg_dump
, and they solve it by temporarily disabling a GUC calledcheck_function_bodies
. This commit adds calls toschema.rb
to do the same thing.I haven't added any new tests yet (though old ones all pass), and I haven't thought about how this breaks non-Postgres adapters (if there are any out there). So this is just a quick fix I can use personally, but if you would like a more polished version please let me know if you agree with the general approach here.