Subject update IBO$SCHEMA_VERSION from system table triggers
Author Markus Ostenried
Hi all,

I'm currently looking at the SchemaCache possibilities.

I already have improved (IMHO) the CheckSchemaVersionTable method so that
it looks first, if the SchemaTable has to be created and what SchemaItem
records have to be inserted into this table. I did this because if you call
the original CheckSchemaVersionTable then it just attempts to create the
SchemaTable and insert all the SchemaItem records - any exceptions are
ignored but when running from the IDE I got anoyed by the debugger popping
up several times. (I know I can tell Delphi to ignore certain exceptions
but I like it the other way better).
If anyone is interested in my changes to CheckSchemaVersionTable then just
drop me a note.

Now I'm at the point when I need to increment the SchemaItem records'
versions in the SchemaTable if the Db's metadata has been updated. I want
to automate this so that I don't have to include a SQL statement to update
the relevant SchemaItems' versions with every metadata change script. On
the other side I don't want to increment all versions since this would be
overhead if my script only added one field to a table.

I'd like to know if someone has already thought about doing this with After
Update Triggers for the relevant system tables ?
Are there any problems with this solution ? e.g. I don't know if custom
triggers on system tables are restored after a backup & restore operation.

I will be happy about any hints, pointers to articles and docs (currently I
don't know much about system tables but I think this could be a good
starting point). I guess I'll have to start with "System Tables" in the
LangRef.pdf.

Many TIA,
Markus