RE: [JBoss-dev] database schema update
Hi, one one side, I really see this as a cool feature during development. On the other side, this is very dangerous. You e.g. have two columns street and housenumber. Now you delete housenumber as you wish to have both fields in one column. The data in housenumber is deleted, but the data in street is not updated to now include the housenmber. So in the next run you might end up looking for lost data. Perhaps a fat warning should be printed when columns are removed. Heiko --- 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
Re: [JBoss-dev] database schema update
Rupp, Heiko wrote: Moving this post to the forums... Joachim Hi, one one side, I really see this as a cool feature during development. On the other side, this is very dangerous. You e.g. have two columns street and housenumber. Now you delete housenumber as you wish to have both fields in one column. The data in housenumber is deleted, but the data in street is not updated to now include the housenmber. So in the next run you might end up looking for lost data. Perhaps a fat warning should be printed when columns are removed. Heiko --- 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 --- 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
Re: [JBoss-dev] database schema update
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