On Wed, 2012-12-05 at 06:32:46 -0800, junepeach wrote: > When I logged in sqlite by 'sqlite3 mydb', and checked 'PRAGMA > foreign_keys', it is still 0. There is no change yet. What is wrong?
It doesn't work like that. From <http://www.sqlite.org/foreignkeys.html>: Foreign key constraints are disabled by default (for backwards compatibility), so must be enabled separately for each database connection separately. That's the purpose of the event handler you have included in env.py -- to execute 'PRAGMA foreign_keys=ON' for each new connection. -- Audrius Kažukauskas http://neutrino.lt/
pgp9jWpyujWpW.pgp
Description: PGP signature
