Add DROP Statements to Exported Scripts

dbdiagram makes iterative design easy, but in order to re-use the script in a Microsoft SQL database, I have to add DROP table statements and perform a simple text comparison to merge each dbdiagram SQL export with the script that creates a SQL database.

Assuming not every dbdiagram user “gets it right the first time”, does it make sense to add to the export script a corresponding DROP statement for each CREATE statement?

Hi Cayers,

Thanks for the suggestions,

Adding DROP statements by default to the exported SQL is risky IMO because it can accidentally delete data that is currently in use. However, we will consider support options for adding DROP statements during export.

Tables can be altered as well. You don’t have to DROP and CREATE them from scratch every time. This is more complex, but no data loss.

Regards,

Steven