On Jul 2, 3:29 pm, "S.Wojnowski" <[email protected]> wrote:
> Hi,
> First of all,
> I have just been testing the sequel lib and want to to say , it's been
> pleasure to work with it so far ;)).
>
> However, I have failed to find any info on how to add a foreign key to
> my (already existing SQLite table). Is such a thing possible in the
> context of the latest version of the sequel lib? For the present I
> have only managed to learn how to do that at the time of creation of a
> table...

SQLite doesn't enforce foreign key constraints as far as I know, but
the following should work:

  DB.alter_table(:table){add_foreign_key :column, :other_table}

Jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to