sql - Storing database version in the database itself -


I am writing a program that uses an H2 database to store data. The database will develop because we add features to our software, but we still want users to use the old version of the database with the new version of the program. In this way, the program can automatically upgrade the database to the new version (possibly asking the user for confirmation first) To write this "database upgrade," we need to store the database version within the database so that the database It is possible to transfer the file (we are using the file mode of the H2 database engine). We tried to do something like this:

  table configuration (database version is not INT);  

But this would mean that a table where only one line is used without the clear line of line queue.

Is there a better way to do this? Thanks in advance for you.

I think this is a good solution, if you simply

database Version is required to continue.

Sometimes you need to continue with more than one 'global' setting, for example if your app has multiple modules, and each module has its own version or other things like The location of the last backup The one I usually use is a settings table with a key / value pair, where both the key (the primary key of that table) and the value type varchar .


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -