Hello empire-db has supplementary ddl sql creation. Generated sql may be then used to create the whole database or table from scratch. However most often changes in database schema are incremental, in example new columns are added to existing tables or columns are indexed for better search performance. empire-db does not support such situations.
There is project called DdlUtils (also from apache foundation) which may do a lot broader set of database changes, not only creation from scratch but also alteration of an existing database schema to a new schema - ie: - adding/removing table/column - change of column type precision, change of column type - adding/removing index - adding/removing foreign key It does not handle table or column rename but it is difficult to do it automatically anyway. If necessary data from existing tables are copied to helper tables to avoid data loss. I have written a function which "translates" empire-db DBDatabase to ddlutils Database (with tables, indexes and foreign keys). Then the resulting database model may be used directly by ddlutils to create or alter table schema, write sql etc. If somebody are interested I can contribute this "experimental" code. Regards Leszek Piotrowicz
