Yes! there's a function in lib for it --> socorro.lib.migrations.load_stored_proc()