I now have the first version of database import working for SQLEditor. This means that you can point it at a database and it will grab the structure of the database directly.
Currently it’s missing foreign key support, but it seems to support most other functionality.
On a related note, I have finally fixed the bug that sometimes meant that you could end up with bad sql code. The new version now uses “alter table” rather than “references”, it creates all of the tables first and then adds the foreign keys. This means that even circular dependencies will now be exportable.