On Wednesday, January 22, 2020 at 5:09:22 PM UTC-8, abhijit wrote:
>
> I did it like this, but it didn't seem to work -
> DB = Sequel.connect( :adapter => 'sqlite', :database => 'database.sqlite', 
> :connect_sqls=>['PRAGMA defer_foreign_keys = 1'])
>
> Did I make a mistake?
>

Works fine for me:

$ irb -r sequel -rlogger
irb(main):001:0> DB = Sequel.connect( :adapter => 'sqlite', :database => 
'database.sqlite', :connect_sqls=>['PRAGMA defer_foreign_keys = 1'], 
:logger=>
Logger.new($stdout))
/usr/local/lib/ruby/gems/2.7/gems/sqlite3-1.4.1/lib/sqlite3/database.rb:89: 
warning: rb_check_safe_obj will be removed in Ruby 3.0
I, [2020-01-22T18:21:07.094737 #37161]  INFO -- : (0.000686s) PRAGMA 
foreign_keys = 1
I, [2020-01-22T18:21:07.094952 #37161]  INFO -- : (0.000061s) PRAGMA 
case_sensitive_like = 1
I, [2020-01-22T18:21:07.095110 #37161]  INFO -- : (0.000073s) PRAGMA 
defer_foreign_keys = 1

What version of Sequel are you using?

-- 
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/8dd4a118-79e1-4674-b70e-bb3a11b2e258%40googlegroups.com.

Reply via email to