From 4dfb3d1608d1fc6d2610986d6690485e1db7db94 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Sun, 23 Apr 2006 21:32:11 +0000 Subject: [PATCH] * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Delete column metadata. svn: r6422 --- gramps2/ChangeLog | 2 ++ gramps2/src/GrampsDb/_GrampsBSDDB.py | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 4c58da85b..d6c277599 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -3,6 +3,8 @@ * src/plugins/TestcaseGenerator.py: fix BIRTH, DEATH constants 2006-04-23 Alex Roitman + * src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Delete column + metadata. * src/PluginUtils/_PluginStatus.py (PluginTrace.__init__): Set scrolling policy to auto; (PluginTrace.close_window): Add method. diff --git a/gramps2/src/GrampsDb/_GrampsBSDDB.py b/gramps2/src/GrampsDb/_GrampsBSDDB.py index 4ed4a8586..15a7f07a2 100644 --- a/gramps2/src/GrampsDb/_GrampsBSDDB.py +++ b/gramps2/src/GrampsDb/_GrampsBSDDB.py @@ -1259,6 +1259,15 @@ class GrampsBSDDB(GrampsDbBase): # primary tables and remove them. status,length = low_level_9(self) + # Remove column metadata, since columns have changed. + # This will reset all columns to defaults + for name in (PERSON_COL_KEY,CHILD_COL_KEY,PLACE_COL_KEY,SOURCE_COL_KEY, + MEDIA_COL_KEY,EVENT_COL_KEY,FAMILY_COL_KEY): + try: + self.metadata.delete(name) + except KeyError: + pass + # Then we remove the surname secondary index table # because its format changed from HASH to DUPSORTed BTREE. junk = db.DB(self.env)