Hi Todd, indeed this can be quite complex.
The aim of empire-db is to be a passive tool and nothing is done automatially. You can let empire-db create DLL statements of any kind, but you have to call db.getDriver().getDDLScript(...) and then execute them manually e.g. using script.run(...) This way may create, alter or drop tables, views, and columns as you like. This has nothing to do with modifying the database definition objects themselves - but of course the changes must match. Regards, Rainer Von: Todd Stout [mailto:[email protected]] Gesendet: Donnerstag, 11. April 2013 14:46 An: [email protected] Betreff: Re: Schema evolution management The functionality provided by the tools you mentioned is what I was after. I thought there might be some migration support in Empire DB. I realize it is a complex problem. Thanks for your suggestions. On Thu, Apr 11, 2013 at 5:46 AM, Eike Kettner <[email protected]> wrote: Hi Todd, I actually cannot answer your question directly. I don't think though, that EmpireDB offers support for schema migration management. This can be quite complex when going beyond adding columns. There are tools / libraries for this available, for example (just some I know in alphabetical order) flywaydb [1], liquibase [2] or migrate4j [3]. Maybe those are more what you looking for? [1] http://flywaydb.org/ [2] http://www.liquibase.org/ [3] http://migrate4j.sourceforge.net/ Regards, Eike On [Wed, 10.04.2013 20:51], Todd Stout wrote: > Are there any guidelines regarding schema evolution with Empire DB? After > looking through the advanced examples, the only instance of schema > modification I can see is a simple add column, then drop the column after > temporarily using it. > > The examples show how to create DDL from a DBTable, DBDatabase, etc. > However, I see nothing describing how to automatically ALTER the schema of > an existing DBDatase by simply adding columns, etc to a DBTable. For > example, If I add a column to a table, how do I coerce Empire DB to alter > the table? I can generate the appropriate DDL script by writing some > custom code to use DBCmdType.ALTER. Is this how schema evolution is > achieved? -- email: [email protected] https://eknet.org pgp: 481161A0
