Subject | RE: [firebird-support] Re: How to update table structure with SQL? |
---|---|
Author | Alan McDonald |
Post date | 2009-06-23T04:35:10Z |
> Still not possible, but it sounds like something to look at. If I cansure you can - do a search in this newsgroup - many threads non this topic.
> see what script they generate, it might be useful.
>
> The problem is I do not have the customer's database. I have no idea
> what version they have either, since Firebird does not contain version
> information. I also use a few databases here - production, testing,
> etc. I cannot generate this difference script against all these
> databases.
>
> The idea is run a script to update ANY database to the current version,
> no matter what the customer has.
>
> I can do it if I know a certain object exists - ie can I check if a
> table or column exists in SQL?
>
> Could I do something in a Procedure perhaps?
Your database, you version it. You keep a library of scripts which move from
each version to each next version. Some updates require several scripts be
run to bring it up to date.
You make a table in your database with version info in it so you can manage
it and query it when required, then update it after you run the script(s).
Alan