Alexey Loubyansky wrote:
Hello Joachim,

first of all, thanks for your work on this.

Since there is no obvious decision how a schema should be updated
looking only at the existing schema and knowing nothing about the
previous mapping details, could you please describe in detail how it
actually works :)

I was planning to ask about documentation etc.


It is assumed that alter-table is used in combination with create-table.
When checking the table structure, the new tables are being added,
and fields which did not exist are being added (by comparing with the existing table in the datasource).


Field which do not exist in the new definition but which existed in the database are being removed. This is somewhat dangerous and assumes that all the fields are represented by the EJB. It would probably be best to make this configurable in some way.

Tables are not removed as this may cause too big a data loss. However, link tables which are not declared in the schema cause a warning.

At the field level, for String fields it is checked whether the newly declared length is longer than the current length. If that is the case, the length is increased. There are no other type or precision conversions.

Basically this should make small changes to the database automatic when deploying, making life easier when upgrading your applications.

Kind regards,
Joachim






------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to