Subject | Re: Updating a database schema on a client site |
---|---|
Author | gkrishna63 |
Post date | 2002-09-11T09:25:05Z |
I am not sure if it is the standard answer
We use EMS Quickdesk. in this tool as you make changes to the database
you can see the script which will make the required change.
So we always cut and append this script into a standard script file.
We then have a script file which is structured like this.
/*UPDATEDTO 9*/
/*VERSION 1*/
script to create version 1 of database
/*VERSION 2*/
script which will convert version 1 to version 2
...............
/*VERSION 9*/
script which will convert version 8 to version 9
Any changes will be appended here.
Further what we do is we maintain build numbers in our exe and
we have a field in the database where we store the build number the
database is
compatible with.
Along with the new exe we ship this script file.
The application on startup checks its file build number and the
database build number
if identical
Go ahead
if database is less.
read version from database into X
look for string /*VERSION X */ in script file
execute script from that point to end of file
update database to have same version as what is in first line
of script (in example script this is 9)
if database is more
Abort
Tell him he needs to upgrade his exe as somebody else has a
later verion of the exe.
HTH
GK
We use EMS Quickdesk. in this tool as you make changes to the database
you can see the script which will make the required change.
So we always cut and append this script into a standard script file.
We then have a script file which is structured like this.
/*UPDATEDTO 9*/
/*VERSION 1*/
script to create version 1 of database
/*VERSION 2*/
script which will convert version 1 to version 2
...............
/*VERSION 9*/
script which will convert version 8 to version 9
Any changes will be appended here.
Further what we do is we maintain build numbers in our exe and
we have a field in the database where we store the build number the
database is
compatible with.
Along with the new exe we ship this script file.
The application on startup checks its file build number and the
database build number
if identical
Go ahead
if database is less.
read version from database into X
look for string /*VERSION X */ in script file
execute script from that point to end of file
update database to have same version as what is in first line
of script (in example script this is 9)
if database is more
Abort
Tell him he needs to upgrade his exe as somebody else has a
later verion of the exe.
HTH
GK
--- In ib-support@y..., "Tickerboo Support" <support@t...> wrote:
> Hello
>
> I'm developing an application and a client is currently running the
beta
> (alpha) release. In the meantime, I'm continuing to develop the
applciation
> and (slightly) changing the database structure. What's the best
way off
> making those database changes to the client's database whilst
retaining
> their data?