evolution-data-server r9308 - trunk/camel



Author: sragavan
Date: Mon Aug 11 06:23:12 2008
New Revision: 9308
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9308&view=rev

Log:
2008-08-08  Srinivasa Ragavan  <sragavan novell com>

	* camel/camel-db.c: Add API for vfolder tables migration.
	* camel/camel-db.h:


Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-db.c
   trunk/camel/camel-db.h

Modified: trunk/camel/camel-db.c
==============================================================================
--- trunk/camel/camel-db.c	(original)
+++ trunk/camel/camel-db.c	Mon Aug 11 06:23:12 2008
@@ -1063,7 +1063,8 @@
 followup_completed_on TEXT ,
 followup_due_by TEXT ," */
 
-char * camel_db_get_column_name (const char *raw_name)
+char *
+camel_db_get_column_name (const char *raw_name)
 {
 	d(g_print ("\n\aRAW name is : [%s] \n\a", raw_name));
 	if (!g_ascii_strcasecmp (raw_name, "Subject"))
@@ -1098,3 +1099,16 @@
 	}
 
 }
+
+int
+camel_db_migrate_vfolders_to_14 (CamelDB *cdb, const char *folder, CamelException *ex)
+{
+	char *cmd = sqlite3_mprintf ("ALTER TABLE %Q ADD COLUMN flags INTEGER", folder);
+	int ret;
+	
+	ret = camel_db_command (cdb, cmd, ex);
+	sqlite3_free (cmd);
+	
+	CAMEL_DB_RELEASE_SQLITE_MEMORY;
+	return ret;		
+}

Modified: trunk/camel/camel-db.h
==============================================================================
--- trunk/camel/camel-db.h	(original)
+++ trunk/camel/camel-db.h	Mon Aug 11 06:23:12 2008
@@ -158,5 +158,7 @@
 
 char * camel_db_get_column_name (const char *raw_name);
 
+/* Migration APIS */
+int camel_db_migrate_vfolders_to_14(CamelDB *cdb, const char *folder, CamelException *ex);
 #endif
 



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