[SQLObject] createTable() and createReferenceConstraints()
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Rick F. <rf...@im...> - 2005-10-14 00:42:17
|
createTable() returns a list of constraints. ex.: ['ALTER TABLE article_category ADD CONSTRAINT article_id_exists FOREIGN KEY (article_id) REFERENCES article (id) ', 'ALTER TABLE article_category ADD CONSTRAINT category_id_exists FOREIGN KEY (category_id) REFERENCES category (id) '] I believe in the past these constraints were applied during createTable(). Is it expected that this be done manually now? I'm able to create the constraints now by doing: constraints = MyTable.createTable() for constraint in constraints: MyTable._connection.query(constraint) Maybe this should be done in createTable(). Anyone know? Thanks. -- Rick |