Thanks! Gonna keep that "run" method in mind :)

On Tuesday, July 7, 2020 at 2:46:55 PM UTC-4, Jeremy Evans wrote:
>
> 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/1ca9349a-efde-402b-bc2b-9396a53e1394o%40googlegroups.com.

Reply via email to