On Apr 12, 2010, at 7:22 PM, NickPerkins wrote:

> Apparently, new versions of SQLite will enforce Foreign Keys ( unlike
> previous versions ), but, for the sake of backwards-compatibility, you
> have to explicitly turn on foreign key enforcement by issuing: "pragma
> foreign_keys=on;".
> 
> http://www.sqlite.org/foreignkeys.html
> 
> I am new to SQLAlchemy -- how can I implement this in my program?
> The docs say that it must be turned on for each database connection
> separately.


Apply a PoolListener to your engine which implements this call for each new 
connection:

http://www.sqlalchemy.org/docs/reference/sqlalchemy/interfaces.html?highlight=poollistener#sqlalchemy.interfaces.PoolListener



> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@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.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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