Page 1 of 1

How to find existing database version???

Posted: Mon Feb 11, 2008 2:44 pm
by paulf
I upgrading to 1.23.1, but need to run zmupdate.pl to upgrade the database.

To do this, I need to know the exact version of the previous database, which I do not know.

Presumably the version number is stored in the database itself - does anyone know where?

Also if it is in the database, why does zmupdate.pl not simply read it from there and apply the appropriate upgrade??! :evil:

Posted: Mon Feb 11, 2008 2:53 pm
by paulf
Answering my own question:

mysql> use zm;
mysql> select * from Config where Name = 'ZM_DYN_CURR_VERSION';

Gives the version. My question still stands about why zmupdate.pl can't simply get the version from the DB and apply the appropriate update.

Posted: Mon Feb 11, 2008 4:15 pm
by zoneminder
Actually that config is not necessarily the actual DB version but rather the effective version depending on whether you have clicked 'ignore' etc when you get the version update popups. The real version should be in ZM_DYN_DB_VERSION but for various reasons, historical and otherwise, it is not always set. I have done a couple of changes that might help in that regard as I agree that it should be automatic.

The actual version you are running is always displayed on the console window by the way. This is hardcoded into zm.conf when you run configure. Of course this is no good for zmupdate as it will always have changed to the new version by the time it runs.