How to find existing database version???

Support and queries relating to all previous versions of ZoneMinder
Locked
paulf
Posts: 7
Joined: Mon Feb 11, 2008 2:40 pm

How to find existing database version???

Post 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:
paulf
Posts: 7
Joined: Mon Feb 11, 2008 2:40 pm

Post 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.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post 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.
Phil
Locked