[anjuta] symbol-db: db version upgraded to 300.



commit f500340e31aa5174b1d8a36f97c011e55adb4793
Author: Massimo Corà <mcora src gnome org>
Date:   Wed Apr 21 21:51:14 2010 +0200

    symbol-db: db version upgraded to 300.
    
    dbs'll be automatically recreated to support 300 version.

 plugins/symbol-db/symbol-db-engine-core.c |    7 ++++---
 plugins/symbol-db/symbol-db-engine-priv.h |    2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-engine-core.c b/plugins/symbol-db/symbol-db-engine-core.c
index a1dd0dc..99f5d24 100644
--- a/plugins/symbol-db/symbol-db-engine-core.c
+++ b/plugins/symbol-db/symbol-db-engine-core.c
@@ -3203,11 +3203,12 @@ sdb_engine_check_db_version_and_upgrade (SymbolDBEngine *dbe,
 	}
 	
 	/* FIXME: in the future versions, if the changes grow up, add a better 
-	 * automatic upgrading system 
+	 * automatic upgrading system. Deleting & recreating the db is anyway
+	 * the best option to do.
 	 */
-	if (version < 230)
+	if (version < atoi (SYMBOL_DB_VERSION))
 	{
-		DEBUG_PRINT	 ("Upgrading from version %d to 230", version);
+		DEBUG_PRINT	 ("Upgrading from version %d to "SYMBOL_DB_VERSION, version);
 		
 		/* we need a full recreation of db. Because of the sym_kind table
 		 * which changed its data but not its fields, we must recreate the
diff --git a/plugins/symbol-db/symbol-db-engine-priv.h b/plugins/symbol-db/symbol-db-engine-priv.h
index af29ace..24c08a1 100644
--- a/plugins/symbol-db/symbol-db-engine-priv.h
+++ b/plugins/symbol-db/symbol-db-engine-priv.h
@@ -35,7 +35,7 @@
 #define ANJUTA_DB_FILE	".anjuta_sym_db"
 
 /* if tables.sql changes or general db structure changes modify also the value here */
-#define SYMBOL_DB_VERSION	"230"
+#define SYMBOL_DB_VERSION	"300"
 
 #define TABLES_SQL			PACKAGE_DATA_DIR"/tables.sql"
 



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