Toad World® Forums

Add "DROP IF EXISTS" clause to the drop statements - PostgreSQL

Hi,

I have created data model for PostgreSQL 9.2. I normally generate DDLs out of the data model directly to regenerate my schema by dropping all the entities and create them as per the data model. However, when I select “Drop and Create, Drop and Create All Keys” under Model|Generate DDL Script… it creates drop also statements for the entities not present in the my schema but only in my data model.

So is it possible to have “DROP IF EXISTS” rather than just DROP while generating DDL from Model|Generate DDL Script…?

How to modify this DDL generation? I would need the same logic while generating Alter DDL too.

Kindly help.

Regards,

Miten

Hi Miten,

thanks for your suggestion. We will do this for some of the next TDM releases. TDM-373. Unfortunately, it will not be resolved in the upcoming v. 5.2.

Anyway, please check your private messages section. Thanks.

Regards, Vladka

Which Eclipse-Plugin Version would this be? Or is it now included?