halim wrote:

What is the best approach to assign a version to the database. Let's say it's starts with then etc.

I'm looking at storing it with the DB itself. Is there a way to store it and read it from system variables? I wanted to use a DB field but it sounds too much for what I want to accomplish.

Sean Leyne answers:

We created an SP (Get_Schema_Version) which we update when we deploy new schema.

Stefan Heymann answers:

I use plain integers (1, 2, 3, ...) as schema version numbers and store them in a table (with a key and value column) that I also use for other general settings.

Woody answers:

I use a separate table in the database to record DDL updates. Each sequence of DDL/SQL commands for updating the database are numbered with a version number in the form of xx.yy.zz. That sequence, the date and the SQL are stored in the table so it can only be run once. I wrote my own separate utility for maintaining and performing the updates so it's easy to build into each app I make.

Paul Marcea answers:

Most often, a database is used for more than a application/module, in my case. For each module/application i store in a table the version of exe and db schema. After each update/upgrade, if is necessary, i modify those values.

Like this post? Share on: TwitterFacebookEmail

Related Articles


Firebird Community



Gems from Firebird Support list