[evolution-ews] Add version info to folders table, would be needed for migration in future.
- From: Chenthill Palanisamy <pchen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Add version info to folders table, would be needed for migration in future.
- Date: Sun, 12 Jun 2011 12:17:30 +0000 (UTC)
commit d89cdc298569f08ec62827f3c790ceafd73c6846
Author: Chenthill Palanisamy <pchenthill novell com>
Date: Sun Jun 12 17:46:50 2011 +0530
Add version info to folders table, would be needed for migration in future.
src/addressbook/e-book-backend-sqlitedb.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-sqlitedb.c b/src/addressbook/e-book-backend-sqlitedb.c
index 9283b43..a4125d4 100644
--- a/src/addressbook/e-book-backend-sqlitedb.c
+++ b/src/addressbook/e-book-backend-sqlitedb.c
@@ -37,6 +37,8 @@
#define d(x)
#define DB_FILENAME "contacts.db"
+#define FOLDER_VERSION 1
+
#define READER_LOCK(ebsdb) g_static_rw_lock_reader_lock (&ebsdb->priv->rwlock)
#define READER_UNLOCK(ebsdb) g_static_rw_lock_reader_unlock (&ebsdb->priv->rwlock)
#define WRITER_LOCK(ebssdb) g_static_rw_lock_writer_lock (&ebsdb->priv->rwlock)
@@ -252,7 +254,8 @@ create_folders_table (EBookBackendSqliteDB *ebsdb,
" folder_name TEXT,"
" sync_data TEXT,"
" is_populated INTEGER,"
- " partial_content INTEGER)";
+ " partial_content INTEGER,"
+ " version INTEGER)";
WRITER_LOCK (ebsdb);
book_backend_sqlitedb_start_transaction (ebsdb, &err);
@@ -329,8 +332,8 @@ add_folder_into_db (EBookBackendSqliteDB *ebsdb,
book_backend_sqlitedb_start_transaction (ebsdb, &err);
if (!err) {
- stmt = sqlite3_mprintf ("INSERT OR REPLACE INTO folders VALUES ( %Q, %Q, %Q, %d, %d ) ",
- folderid, folder_name, NULL, 0, 0);
+ stmt = sqlite3_mprintf ("INSERT OR REPLACE INTO folders VALUES ( %Q, %Q, %Q, %d, %d, %d ) ",
+ folderid, folder_name, NULL, 0, 0, FOLDER_VERSION);
book_backend_sql_exec (ebsdb->priv->db, stmt, NULL, NULL, &err);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]