Hello,
What is the code for setting up a compound key?

For normal key I would do:
Column('id', Integer, primary_key=True, autoincrement),

For compound key I do?
Column('id', Integer, primary_key=True),
Column('idupdate', Integer, primary_key=True, autoincrement),

In sql form that would be something similar to:
CREATE TABLE search
(
    Category VARCHAR(100) NOT NULL,
    Page VARCHAR(20) NOT NULL,
    Directory VARCHAR(255) NOT NULL,
    LinkName VARCHAR(255) NOT NULL,
    Keywords MEDIUMTEXT NOT NULL,
    Desription VARCHAR(255) NOT NULL,
    PRIMARY KEY(Page, Directory)
);


I couldn't find this in documentation. Ideas?

Thanks,
Lucas

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

Reply via email to