[anjuta] symbol-db: Add update_flag to the symbol unique constraint.

commit 9d5ecb1908b642587886a505cd5c5bb246e18afe
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Thu Jan 10 17:43:13 2013 +0100

    symbol-db: Add update_flag to the symbol unique constraint.
    When inserting/updating symbols we only care that the symbol is unique among the
    symbols that will be kept after all insertions/updates are done, eg. the symbols
    whose update_flag is 1.
    This should fix the following warning from appearing:
    (anjuta:5183): libanjuta-symbol-db-WARNING **: SQL execute_non_select failed:
    columns name, file_defined_id, file_position are not unique

 plugins/symbol-db/symbol-db-engine-priv.h |    2 +-
 plugins/symbol-db/tables.sql              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/symbol-db/symbol-db-engine-priv.h b/plugins/symbol-db/symbol-db-engine-priv.h
index 159d6c9..fee3e5c 100644
--- a/plugins/symbol-db/symbol-db-engine-priv.h
+++ b/plugins/symbol-db/symbol-db-engine-priv.h
@@ -38,7 +38,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	"340.0"
+#define SYMBOL_DB_VERSION	"373.0"
 #define TABLES_SQL			PACKAGE_DATA_DIR"/tables.sql"
diff --git a/plugins/symbol-db/tables.sql b/plugins/symbol-db/tables.sql
index a831f22..e0db171 100644
--- a/plugins/symbol-db/tables.sql
+++ b/plugins/symbol-db/tables.sql
@@ -45,7 +45,7 @@ CREATE TABLE symbol (symbol_id integer PRIMARY KEY AUTOINCREMENT,
                      access_kind_id integer REFERENCES sym_access (sym_access_id),
                      implementation_kind_id integer REFERENCES sym_implementation (sym_impl_id),
                      update_flag integer default 0,
-                     unique (name, file_defined_id, file_position)
+                     unique (name, file_defined_id, file_position, update_flag)

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