On Wed, Aug 25, 2004 at 06:39:09PM -0000, Aaron Stone wrote:
> ""Christian G. Warden"" <[EMAIL PROTECTED]> said:
> 
> > On Wed, Aug 25, 2004 at 06:30:04PM -0000, Aaron Stone wrote:
> >> ""Matthew T. O'Connor"" <[email protected]> said:
> >> 
> >> > What might be helpful instead is a tool that is updated every time 
> >> > someone makes a change to the schema of the database that verifies that 
> >> > the user's schema is totally correct.  Major problems will be obvious, 
> >> > but missing unique indexes or wrong data types etc... will cause subtle 
> >> > breakages.
> >> 
> >> This is essentially the holy grail of database upgrade systems. Eventually
> >> we should include a 'dbmail-check' or 'dbmail-upgrade' (something like
> >> that) that reads out the schema, compares it to the release schema, and
> >> performs the necessary ALTER commands to get it up to date.
> >> 
> >> To the best of my knowledge, no such tool exists :-\
> > 
> > mysqldiff and pgdiff should be useful.
> 
> Both require fairly significant human parsing in order to generate
> reliable upgrades, don't they?

Perhaps.  I used mysqldiff a while ago, and the SQL it generated wasn't
ideal.  It would drop columns that had changed and re-add them rather
than modify them causing data loss.  Nonetheless, it should at least
point out the changes that need to be made.  I've been running a pre-RC
CVS snapshot of 2.0 since last year, so when I finally upgrade, I'll
need something like mysqldiff to figure out what schema changes I need
to make.

I don't have any experience with pgdiff.

xn

Reply via email to