r20123 - gnucash/trunk/src/backend - Enhanced database version handling.
Derek Atkins
warlord at MIT.EDU
Wed Jan 19 11:32:42 EST 2011
John,
John Ralls <jralls at code.gnucash.org> writes:
> * Add a macro GNC_RESAVE_VERSION which holds an svn revision number.
> * When fully saving a database put this number in versions with
> table_name Gnucash-Resave.
> * On database load, compare the current GNC_RESAVE_VERSION with the
> Gnucash revision and Gnucash-Resave revision saved when the database
> was created.
> * If the current GNC_RESAVE_VERSION > the saved Gnucash
> version, then emit ERR_SQL_DB_TOO_OLD.
> * If GNC_RESAVE_VERSION < the saved Gnucash-Resave, emit ERR_SQL_DB_TOO_NEW.
Why tie this to an SVN revision instead of just a monotonically
increasing "schema version" number?
Developers need to remember to change this value whenever they change
the schema, so I don't see why the actual number makes a difference?
If we do change to git then we wont have the svn revision # to work
from...
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list