Added Sqlite pragma option and enabled foreign keys by default.