introduce database autoupdate mechanism


Open Queue must be capable of identifying the database schema and run needed update scripts if necessary. This also includes the initial creation of all needed tables.
It needs be be defined if this also includes the longest waiting table and trigger, as this automatically needs an existing IpPbxCdr table. This table will not be available on every SwyxWare installation.
How to implement this:
  • each version that comes with a db schema update comes also with an update script to perform the update from the previous version.
  • the "first" update script (of version 2) includes all the needed stuff for the initial setup.
    If, for example, a user installs version 5 (as first time setup) Open Queue will run all update scripts from the 1 to the last belonging to version 5.
    If a user updates from version 3 to version 5 OpenQueue will run the update scripts for version 4 and version 5.