On Tuesday, October 23, 2018 at 8:52:10 AM UTC-7, genc wrote:
>
> Thank you, Jeremy! It did worked.
>
> One last question. About migrations. I have a few foreign keys already 
> declared and they are set to "on delete SET NULL". I would like to change 
> them to "on delete CASCADE". I know there was a way of doing this but 
> alter_table seems not mentioned about this. How can I change cascade styule 
> for an existing foreign key using migrations?
>

Sequel doesn't support that directly, you would have to drop the foreign 
key constraint and readd it with :on_delete=>:cascade, or use 
database-specific SQL (assuming the database supports altering the foreign 
key constraint, I'm not sure which databases support that).

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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to