MySQL Forums
Forum List  »  MySQL Workbench

Re: Use LUA to customize SQL export
Posted by: Alfredo Kengi Kojima
Date: February 04, 2009 09:56AM

Hi

That's possible, but not very easily. Make a plugin or script that will:

- Iterate over all objects in the schema, making a list
- Reorder objects in the list as you want
- Use MySQLModuleDbMySQL:makeCreateScriptForObject(object) to get the SQL for each object
- Write the script to a file

That will of course, not have all the options that the forward engineer wizard has, so you'll have to handle any exceptions you want to make yourself.

Take a look in the scripting posts in http://wb.mysql.com, there are some examples and useful snippets.

Cheers,
Alfredo

Options: ReplyQuote


Subject
Views
Written By
Posted
5111
February 02, 2009 10:22PM
3287
February 03, 2009 09:33AM
3434
February 03, 2009 09:41AM
Re: Use LUA to customize SQL export
3375
February 04, 2009 09:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.