Appending DB fields instead of regenerating entire table

IS there any way to append fields to a database table when generating Database instead of re-creating the entire table? It would be nice to do that so we can preserve our existing data. The idea would be if I had a table called Products and I added a field called Description to an existing ER model, then when I generate the Database, it just creates a new column rather then an entire table.

John

Hi John,

Yes, we do provide this option. But it is only available when performing the generation via the dialog instead of wizard. Here are the steps:

  1. Select Tools | Object Relational Mapping (ORM) | Generate Database… from the main menu. This displays the Database Code Generation dialog box.

  2. Click on the drop down menu of Generate Database, and select Update Database. By selecting this option, database will be altered. (Please refer to the attachment for details)

If you feel uncomfortable with the above method, you may use the generated DDL to execute the update instead of using this option. By making use of the DDL file, everything is under your control. You can read through the content of the DDL clearly, truly understand the situation and then manually execute the update.

I hope the information has helped. If there are any other questions, please let me know.

Best Regards,
Jick


updateDB20060207a.PNG