>Hi,
>
>I am looking for suggestions to "stamp" a number/version to a database. The purpose of such number would be when running an update script (script that changes/updates certain constraints of the database) I can check for this number. And if the number is, say, greater than so-and-so, skip sections of the script. For example, pseudo code as following:
>
>
>if [database version] < 2.00
>
>endif
>
>
>Where in the database can I store such number? And what would be the syntax of checking the value of this number?
>
>TIA.
In out case we just use a table with one row called MetaData that has one row and two columns (Version, Other) and the following data (currently):
version other
4.1 [4.1.03.0114] <EncryptionVersion>2.0.0</EncryptionVersion>
Each update scripts starts from checking the last backup and the version info and if it matches, performs update and last step updates this version to the latest version.
If it's not broken, fix it until it is.
My Blog