From: Rutger V. <rut...@gm...> - 2009-04-23 20:58:21
|
> It's not a good way to manage schema versions, though. I.e., there > would be none, and accordingly, you then can't have software that uses > the database directly rather than through Hibernate and still relies > on anything, and you can't make any direct modifications to the schema. So how do we make the jump to a situation where we have a versioned schema? The way I imagined it would be to let hibernate generate a pg-compatible schema file, run it on a fresh pg instance and stick the file in the repository. Now we've made the jump. Then - what happens if we need to alter one table (e.g. we need to make the "abstract" field of "article" longer)? We run an "alter table'" command an paste the command at the bottom of the schema file? Or is this a point where we change the original "create" command for the "article" table and rerun the whole script (which might involve dropping and reloading the whole database)? |