Generate alter script for single objects

At the moment, and as far as I know, if you make changes in one entity and want to generate an alter script against a database, if you select only that table to compare to in the Sync wizard, the wizard shows as if all the other tables didn’t exist in the DB (trying to generate a CREATE TABLE) and anyway reversing the complete database.

Instead of that, my question is if it is possible to generate an alter script comparing only the entity youy have changed in the model with the corresponding table in the DB (saving a lot of time).

Hello Jeronimo,

Let me reply.

Alter script - model versus db
There are two possibilities:

  1. On page Select Objects (RE) select only the one table to reverse.
    Follow other steps in the Wizard.
    Now on page Select Items, you can see also all other tables as TDM says: These tables exist in model1, but do not exist in model2 (created from db).
    a) Now if you leave the default selection on this page and generate alter script, alter script for all the changes will be generated. - This is what you do not want.
    b) Modify the selection of items - clear the Action checkbox for all the changes except for the one entity for which you want to generate alter script: Right-click the model name item in the list and select Uncheck All Children, then select the Action checkbox for the one entity.
    -> Alter script for the one entity will be generated.

  2. On page Select Objects (RE) leave the default selection of all tables. All the tables will be reversed. Follow other steps in the Wizard.
    Now on page Select Items, you can see only the one difference, the one entity.
    -> Alter script for the one entity will be generated.

This method takes more time, so if your model is large, we recommend the method 1.

If you have any questions, please write us back. Thanks.

Regards,

Vladka + TDM Team

Thak you very much, Vladka.

My mistake was to think that selecting a few tables to reverse would reverse the entire
database… I don’t know how I didn’t notice :slight_smile:

Thanks again for your great explanation.