This works for us (where the files just contain sql):

  up do
    root_dir = File.expand_path('..', __dir__)
    sql = File.read(File.join(root_dir, 'ddl', 'triggers', 'audit_logged_actions.sql'))
    run sql
  end


On 2020/07/07 18:27, John Devine wrote:
I prefer to keep any PL/pgSQL functions or procedures defined in their own files.

Is there a simple way to call such files from within a migration?
--
You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/a5f86a3a-c523-484e-9f60-58d8079356f9o%40googlegroups.com <https://groups.google.com/d/msgid/sequel-talk/a5f86a3a-c523-484e-9f60-58d8079356f9o%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/70290517-fd18-f5c0-4dbb-103686a7339a%40telkomsa.net.

Reply via email to