Subject | RE: [firebird-support] database upgrades - producing the script(s) |
---|---|
Author | Alan McDonald |
Post date | 2009-05-01T11:45:01Z |
> My current project is developing rapidly so I wondered how otherI always have two DB's on my dev environment.
> developers handle generating the script to do each upgrade.
> I can compare the ddl using dev studio or db workbench to get a
> starting point and then hand modify but this is very time-consuming
> and requires having handy a copy of the previous database and data
> files, is there something better out there that I have been unable to
> find?
>
> This is on a fedora core 8 platform using firebird 2.1.1 if that makes
> a difference
Master and Target.
I develop all I want on Master until it's time to deploy a revision.
I do a compare against Target, generate Script. Inspect script, never apply
DML in this script, only DDL.
Hardly ever hand manipulate anything.
Create a separate DML script if required.
When I'm ready I run script against Target.
Errors? Fix them and the script. No errors? great.
Change target connect to production. choose appropriate time, run script
then DML script if any.
I run script against multiple servers in one script.
Now all my servers dev and target copy are in sync.
Dev cycle starts again.
Intermittently I take a brand new copy of production, then create new target
as well and start again.
I hardly ever need to hand crank anything. I've been following this method
for over ten years in this production environment. Simple. I use IBExpert. I
think, like DBWorkbench, it even knows when to create a re-create script for
views etc which have complex dependencies.
Alan