Hi, []

I'm trying to create tables in SQLITE, with a composite PK (id, eid), I want
the id have the auto increment.
I've read this,
http://www.sqlalchemy.org/docs/dialects/sqlite.html#auto-incrementing-behavior,
and following your instructions, added __table_args__ =
{'sqlite_autoincrement':True}
(I'm using declarative), but i'm not having any difference.

This is the debug exit and the declarative code:

2011-01-28 13:48:56,999 INFO sqlalchemy.engine.base.Engine.0x...b9ec
CREATE TABLE elementos_filiales (
id INTEGER,
tipo TEXT,
 timestamp TEXT,
eid VARCHAR(127) NOT NULL,
nombre TEXT,
 eliminado INTEGER,
padre INTEGER,
PRIMARY KEY (id, eid),
 FOREIGN KEY(padre) REFERENCES elementos_multinacionales (id)
)

....

id = Column(Integer,primary_key=True,nullable=True)
eid = Column(String(132),primary_key=True)

....

What i'm doing wrong?

Thank you.



-- 
Alex.
Slothy, the Angry Wombat
http://angrywombat.comuv.com/portfolio/

-- 
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to