SQLEditor: Dropping Tables
This document explains how SQLEditor drops tables when exporting to databases
Exporting to Database
Using the default settings, SQLEditor does not drop tables at all when you export to a database. It adds and modifies tables as required but it doesn’t drop them.
By using the Drop tables option in the Export to Database panel SQLEditor can be made to drop tables that exist in the database but are not present in the document.
However when SQLEditor drops tables it doesn’t just drop tables that have been deleted from the document. It will also drop tables that other database users may have added tables or that you may have chosen not to import into your document.
Using the Simulate Export option
When using the Simulate Export option SQLEditor will run the complete export process including the comparison import, but will not make any changes to the database. Instead the instructions will be logged, but not executed.
Note that simulate export first imports the existing database to compare with, so it does require access to the database.
Using the diff sidebar panel
The diff sidebar panel does not access the database and merely shows the differences between the current document and the last snapshot that got imported. If there is no available snapshot, it will show a complete export.
How can I drop only the tables that I deleted from the document
The best way now is to take a copy of your document and save it in a separate SQLEditor file. Specify drop tables in the document and use the diff sidebar to get a list of dropped tables. Then apply those drop instructions to the database manually.
(This has been noted for improvement)