From: Christoph S. <ch...@mc...> - 2002-08-21 09:54:24
|
Hi viktor! ----- Original Message ----- From: <phr...@im...> To: "Christoph Sturm" <ch...@mc...>; "Christoph Sturm" <ch...@sc...>; <Gavin_King/Cirrus%CI...@ci...> Cc: <hib...@li...> Sent: Tuesday, August 20, 2002 7:39 PM Subject: Re: [Hibernate-devel] Volunteers? [alter schema] > > I was thinking about diffing against jdbc metadata. What I had in mind was > > an automatic check of the database metadata when hibernate starts up, and > > automatic execution of ddf statements that add missing columns and tables. > > even this poses some problems, eg. when you're trying to add a NOT NULL > column... also, renaming a column would not be recognized... so i think > the closest you can get is a schema comparison, and a default alter > script, which you have to tweak manually. still comes handy though, but > has not much to do with hibernate itself i guess :) IMHO this has a lot to do with hibernate, since it makes sure that you can just deploy a new version of your software, that has additional columns, and it will just work. Declaring values not null is not really necessary here, and renaming columns too. If you need to set a column not null, you can still do that later by hand after assigning a default value. peace chris |