On Wed, 2012-12-05 at 07:04:57 -0800, junepeach wrote:
> Thank you Audrius.Maybe when I ran 'alembic upgrade head', 'PRAGMA
> foreign_keys' value of the current sqlite DB connection was already
> changed to 1 which I need to test in a python code. However when I
> manually logged in by typing 'sqlite3 mydb', this is another
> connection, so the 'PRAGMA foreign_keys' value became '0' again. Not
> sure if I am correct about that?

That's right, you need to execute 'PRAGMA foreign_keys=ON' every time
you connect to your DB, doesn't matter what client you use.  There's no
permanent way to turn foreign keys constraint on.

-- 
Audrius Kažukauskas
http://neutrino.lt/

Attachment: pgpa1ChHh8lDI.pgp
Description: PGP signature

Reply via email to