On Nov 13, 8:48 pm, flebber <[email protected]> wrote:
> The only thing that would be unusual about my db is that I want to use
> two primary keys time & date

are you trying to create 2 primary keys on the table? that's not valid
in an SQL schema - the point of a primary key is it's a single key
that uniquely identifies a row.


> as no more than one event can occur at
> any time though multiple events could occur on a day. I am not
> understanding in sequel how to correctly create a db with multiple
> keys?

it sounds like what you want is a composite primary key, where the
primary key contains multiple columns.

the syntax for this is simple, just search for "composite primary key"
in the migration docs - 
http://sequel.rubyforge.org/rdoc/files/doc/migration_rdoc.html


I don't know your schema, but is there any reason you're using
distinct columns for date and time rather than a single datetime
column?

cheers

Russell

-- 
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