* src/GrampsBSDDB.py: Rename upgrade to avoid collision; add DB

upgrade routine; require DB to be at least version 5 (gramps
2.0.0); separate primary and secondary load (may need to reverse
later).
* src/GrampsDbBase.py: Rename upgrade to avoid collission.
* src/RelLib.py (Witness.py): Add empty class to enable upgrades
from the earlier DB versions.
* src/ViewManager.py: move upgrade into the DB class (may need to
reverse later).


svn: r5553
This commit is contained in:
Alex Roitman
2005-12-15 06:19:37 +00:00
parent 17def2e4b6
commit a595fad677
5 changed files with 236 additions and 402 deletions

View File

@@ -682,10 +682,14 @@ class ViewManager:
#self.state.db.set_undo_callback(self.undo_callback)
#self.state.db.set_redo_callback(self.redo_callback)
if self.state.db.need_upgrade():
if callback:
callback(_('Upgrading database...'))
self.state.db.upgrade()
#if self.state.db.need_upgrade():
# print "start callback"
# if callback:
# callback(_('Upgrading database...'))
# print "done callback"
# print "start upgrade"
# self.state.db.gramps_upgrade()
# print "done upgrade"
GrampsKeys.save_last_file(name)