[evolution-ews] Enable foreign keys in run time.



commit aab94011d8f8dcb1c19d5d2931c143c8ab4aa807
Author: Chenthill Palanisamy <pchenthill novell com>
Date:   Thu May 12 06:22:15 2011 +0530

    Enable foreign keys in run time.

 src/addressbook/e-book-backend-sqlitedb.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-sqlitedb.c b/src/addressbook/e-book-backend-sqlitedb.c
index 742efa4..e030da6 100644
--- a/src/addressbook/e-book-backend-sqlitedb.c
+++ b/src/addressbook/e-book-backend-sqlitedb.c
@@ -377,7 +377,10 @@ book_backend_sqlitedb_load	(EBookBackendSqliteDB *ebsdb,
 	sqlite3_create_function (priv->db, "MATCH", 2, SQLITE_UTF8, NULL, e_book_sqlitedb_match_func, NULL, NULL);
 	
 	WRITER_LOCK (ebsdb);
+
 	book_backend_sql_exec (priv->db, "ATTACH DATABASE ':memory:' AS mem", NULL, NULL, NULL);
+	book_backend_sql_exec (priv->db, "PRAGMA foreign_keys = ON", NULL, NULL, NULL);
+
 	WRITER_UNLOCK (ebsdb);
 
 	create_folders_table (ebsdb, error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]