On Tuesday, July 7, 2020 at 10:13:16 AM UTC-7, James Silberbauer wrote:
>
> 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
>

If the file contains multiple SQL statements, whether this approach works 
depends on whether the driver will handle multiple SQL statements in a 
single call.  Some do, some don't.  If the file contains a single SQL 
statement, this approach should work for all adapters.

Thanks,
Jeremy

-- 
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/c325dc88-dc2a-4d11-a73c-1eb996bb0687o%40googlegroups.com.

Reply via email to