diff --git a/ChangeLog b/ChangeLog index 03e8447a4..4e21f2f8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 2006-08-06 Alex Roitman + * src/GrampsDb/_GrampsBSDDB.py (GrampsBSDDB.close): Try to reset + the log sequence numbers to make grdb file portable. * data/gramps.schemas.in: Typo. 2006-08-05 Alex Roitman diff --git a/src/GrampsDb/_GrampsBSDDB.py b/src/GrampsDb/_GrampsBSDDB.py index fb67fd6ed..c65a8ab51 100644 --- a/src/GrampsDb/_GrampsBSDDB.py +++ b/src/GrampsDb/_GrampsBSDDB.py @@ -902,6 +902,16 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback): self.source_map.close() self.media_map.close() self.event_map.close() + + # Attempt to clear log sequence numbers, to make database portable + # This will only work for python2.5 and higher + try: + self.env.lsn_reset(self.full_name) + except AttributeError: + print "Your grdb database is not portable!" + print "It will not work if you move the file to another machine." + print "Export to XML for portability." + self.env.close() self.close_undodb()