Subject Re: [IBO] update a database with structure / triggers / ect..
Author Daniel Albuschat
2006/7/6, ronald_greven <rs@...>:
> Hi there,
>
> I use Delphi5, Firebird 1.0/1.5 (both) and IB_Objects.
>
> We have a reference Database, where we develop. Each time, we edit one
> or more stored procedures / trigger / data structure we have to update
> the database, which is installed by our customers.
>
> At the moment we do this manually.
>
> Is there a easier way to do this automatically (maybe with an own
> update application)?

Rick Debay posted an interesting article on this topic on firebird-support
recently:
http://www.martinfowler.com/articles/evodb.html

We use a similar technique:
There's a sql-script file with the version it's updating to in it's
filename that
gets automatically executed if the database is older than the application.

So there's upd_01_002.sql and the application has version 1.2, but the database
has version 1.1 (recorded in a db_version table, for example).
The application then runs the (and any other needed) update sql-script
automatically.
This way, any version of the database is recoverable from the root-version.

Regards,
Daniel Albuschat

--
eat(this); // delicious suicide