<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - Workbench - Plugins &amp; Scripts</title>
        <description>Forum to discuss plugin and script coding.</description>
        <link>http://forums.mysql.com/list.php?155</link>
        <lastBuildDate>Tue, 24 Nov 2009 20:22:48 +0000</lastBuildDate>
        <generator>Phorum 5.2.1-alpha</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?155,285329,285329#msg-285329</guid>
            <title>MySQL Workbench: Running Python Scripts (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,285329,285329#msg-285329</link>
            <description><![CDATA[ MySQL Workbench: Running Python Scripts<br />
<a rel="nofollow"  href="http://blog.some-abstract-type.com/2009/10/running-python-scripts-within-mysql.html">http://blog.some-abstract-type.com/2009/10/running-python-scripts-within-mysql.html</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Thu, 08 Oct 2009 19:02:23 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,285302,285302#msg-285302</guid>
            <title>MySQL Workbench: Enabling Python in the GRT shell (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,285302,285302#msg-285302</link>
            <description><![CDATA[ MySQL Workbench: Enabling Python in the GRT shell <br />
<a rel="nofollow"  href="http://blog.some-abstract-type.com/2009/10/mysql-workbench-enabling-python-in-grt.html">http://blog.some-abstract-type.com/2009/10/mysql-workbench-enabling-python-in-grt.html</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Thu, 08 Oct 2009 16:29:11 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,283877,283877#msg-283877</guid>
            <title>Lua script for batch commenting BOOL columns (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,283877,283877#msg-283877</link>
            <description><![CDATA[ Hi there,<br />
<br />
in the new version of Workbench, BOOLEAN columns are rendered as TINYINT(1) when generating SQL.<br />
<br />
This is very annoying to me, because I often manually edit the SQL code and I can no longer distinguish between booleans and very small integers.<br />
<br />
I wrote a small lua script to add a *BOOL* comment on every BOOLEAN column, so I can now easily distinguish them.<br />
<br />
Hope this will be useful, just my 2c.<br />
<br />
Script:<br />
<br />
--<br />
-- Inspired from MySQLFKRenaming<br />
--<br />
-- this function is called first by MySQL Workbench core to determine number of plugins in this module and basic plugin info<br />
-- see the comments in the function body and adjust the parameters as appropriate<br />
--<br />
<br />
function getModuleInfo()<br />
	return {<br />
		name= &quot;MySQLBoolCommenter&quot;,<br />
		author= &quot;Gabriele Tozzi &lt;gabriele@tozzi.eu&gt;&quot;,<br />
		version= &quot;1.0&quot;,<br />
		implements= &quot;PluginInterface&quot;,<br />
		functions= {<br />
			&quot;getPluginInfo:l&lt;o@app.Plugin&gt;:&quot;,<br />
			&quot;addBoolComments:i:o@db.Catalog&quot;<br />
		}<br />
	}<br />
end<br />
<br />
<br />
function objectPluginInput(type)<br />
	return grtV.newObj(&quot;app.PluginObjectInput&quot;, {objectStructName= type})<br />
end<br />
<br />
function getPluginInfo()<br />
	local l<br />
	local plugin<br />
<br />
	-- create the list of plugins that this module exports<br />
	l= grtV.newList(&quot;object&quot;, &quot;app.Plugin&quot;)<br />
<br />
	-- create a new app.Plugin object for every plugin<br />
	plugin= grtV.newObj(&quot;app.Plugin&quot;, {<br />
		name= &quot;wb.catalog.util.addBoolComments&quot;,<br />
                caption= &quot;Add comments to BOOL columns&quot;,<br />
		moduleName= &quot;MySQLBoolCommenter&quot;,<br />
		pluginType= &quot;normal&quot;,<br />
		moduleFunctionName= &quot;addBoolComments&quot;,<br />
		inputValues= {objectPluginInput(&quot;db.Catalog&quot;)},<br />
		rating= 100,<br />
		showProgress= 0,<br />
		groups= {&quot;Catalog/Utilities&quot;, &quot;Menu/Utilities&quot;}<br />
	})<br />
<br />
	-- fixup owner<br />
	plugin.inputValues[1].owner= plugin<br />
<br />
	-- add to the list of plugins<br />
	grtV.insert(l, plugin)<br />
<br />
	return l<br />
end<br />
<br />
<br />
-- function to go through all schemata in catalog and add a comment to all BOOL columns<br />
function addBoolComments(obj)<br />
	<br />
	local i, j, k, schema, tbl, renames, idxrenames, newName, newNameBase, newNameSfx<br />
	<br />
	-- loop over all catalogs in schema<br />
	for i = 1, grtV.getn(obj.schemata) do<br />
		local table_map = {}<br />
		schema = obj.schemata[i]<br />
<br />
		commented= 0<br />
		skipped= 0<br />
		<br />
		print(&quot;-- start renaming tables in schema `&quot; .. schema.name .. &quot;` --&quot;)<br />
<br />
		-- loop through all tables<br />
		for j = 1, grtV.getn(schema.tables) do<br />
<br />
			tbl = schema.tables[j]<br />
<br />
			-- print(&quot;-- table `&quot; .. tbl.name .. &quot;` --&quot;)<br />
		    <br />
			for k = 1, grtV.getn(tbl.columns) do<br />
			<br />
				col = tbl.columns[k]<br />
				<br />
				if string.sub(col.formattedRawType,0,4) == &quot;BOOL&quot; then<br />
					-- print(&quot;-- column `&quot; .. col.name .. &quot;` IS BOOLEAN&quot;)<br />
						if string.sub(col.comment,0,6) ~= '*BOOL*' then<br />
							print(&quot;-- commenting `&quot; .. tbl.name ..&quot;`.`&quot; .. col.name ..&quot;` --&quot;)<br />
							newcomment = &quot;*BOOL* &quot; .. col.comment<br />
							col.comment = newcomment<br />
							commented = commented + 1<br />
						else<br />
							skipped = skipped + 1<br />
						end<br />
				end<br />
			<br />
			end<br />
		end<br />
		print(&quot;-- finished commenting. &quot; .. commented .. &quot; done, &quot; .. skipped .. &quot; skipped in schema `&quot; .. schema.name .. &quot;` --&quot;)<br />
	end<br />
<br />
	return 0<br />
end]]></description>
            <dc:creator>Gabriele Tozzi</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Tue, 29 Sep 2009 20:55:25 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,281863,281863#msg-281863</guid>
            <title>Script to Update Column Names to Standard Abbreviations (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,281863,281863#msg-281863</link>
            <description><![CDATA[ Hi,<br />
<br />
Does anyone have a script that will run against the entire schema and update column names to a standard set of abbreviations. For instance, if my table contains a column called ACCOUNT_NUMBER the script would rename it to ACCT_NO based on a dictionary of abbreviations.<br />
<br />
The script could contain the dictionary of abbreviations as an array (ACCOUNT = ACCT, NUMBER = NO, etc. etc.). There are probably no more than 300 abbreviations of interest.<br />
<br />
Looks like this would be a fairly easy plugin to code - but  I have no experience in coding GRT scripts. If someone could get me started in the right direction it would be greatly appreciated.<br />
<br />
Thanks.]]></description>
            <dc:creator>Julian Bishop</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Fri, 18 Sep 2009 03:50:07 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,281563,281563#msg-281563</guid>
            <title>Conditional Not Working in Script (2 replies)</title>
            <link>http://forums.mysql.com/read.php?155,281563,281563#msg-281563</link>
            <description><![CDATA[ I have written an update script that is supposed to check individual revision numbers and apply the revisions to a database if they do not exist.  The conditional statements are not working, however.  I can't seem to figure out what I am doing wrong with it.  Even a simple IF 1 = 1 THEN select * from revisions; END IF; statement fails on running.  Here is the script:<br />
<br />
SET @cur_rev_num = 0;<br />
<br />
SET @description = NULL;<br />
<br />
<br />
<br />
-- UPDATE 1 - (PLACE DESCRIPTION HERE)  COPY AND PASTE BELOW CODE TO PRIOR TO EDITTING CURRENT REVISION<br />
<br />
SET @cur_rev_num := 1;  -- REPLACE THIS VALUE WITH CURRENT UPDATE NUMBER<br />
<br />
SET @description := &quot;REPLACE THIS WITH DESCRIPTION&quot;;<br />
<br />
IF (SELECT COUNT(revision_number) FROM revisions WHERE revision_number = @cur_rev_num) = 0 THEN<br />
<br />
	--PLACE UPDATE CODE HERE<br />
	INSERT INTO users (username, password) values ('joe', 'blow');<br />
<br />
	INSERT INTO revisions (revision_number, description, committed_on) VALUES(@cur_rev_num, @description, NOW());<br />
<br />
END IF;<br />
<br />
The error I am getting when I run this script is:<br />
<br />
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF (SELECT COUNT(revision_number) FROM revisions WHERE revision_number = @cur_re' at line 1<br />
<br />
Can anyone shed some light on why no conditional statement seems to be working currently?<br />
<br />
Thanks]]></description>
            <dc:creator>Eric Salsbury</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Mon, 21 Sep 2009 06:24:49 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,279686,279686#msg-279686</guid>
            <title>Custom python plugins not being installed (1 reply)</title>
            <link>http://forums.mysql.com/read.php?155,279686,279686#msg-279686</link>
            <description><![CDATA[ I am having difficulty getting a custom python module/plug-in to display in the Plugins menu. I have followed <a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=197">http://dev.mysql.com/workbench/?p=197</a> to the best of my ability but the plugin menu will not reflect my plugin.<br />
<br />
I am running MySQL Workbench 5.1.17 SE and Windows XP SP3.  Any help would be appreciated.]]></description>
            <dc:creator>Ryan Taylor</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Wed, 30 Sep 2009 03:02:41 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,278983,278983#msg-278983</guid>
            <title>Running LUA script in Workbench (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,278983,278983#msg-278983</link>
            <description><![CDATA[ Hi - this is a pretty newbie question, but I haven't been able to resolve this any other way.<br />
<br />
I haven't been able to run an LUA script (plain text file, with .lua extension) from the Tools &gt; Run Workbench Script menu item. I can see the file, but cannot select it in the file browsing window.<br />
<br />
I am using MySQL Workbench 5.1.16, rev. 4210 on Mac OS X 10.5.8<br />
<br />
I have been trying to run a file containing the script described at this location:<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=271">http://dev.mysql.com/workbench/?p=271</a><br />
<br />
by copying the script contents, pasting into a plain text file and saving as a '*.lua' file.<br />
<br />
Thanks for any help.<br />
<br />
Regards,<br />
-John]]></description>
            <dc:creator>John Critchley</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Mon, 31 Aug 2009 20:14:27 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,275629,275629#msg-275629</guid>
            <title>Local variables in scripts (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,275629,275629#msg-275629</link>
            <description><![CDATA[ I'm trying to adjust my database creation scripts to cope with development, test and live environments. In development I use InnoDB and in live/test I use a ndb. I thought I could something like this:<br />
<br />
set @ENGINE_NAME='ndb';<br />
set @DISK_STORAGE=' STORAGE DISK ';<br />
<br />
select @ENGINE_NAME, @DISK_STORAGE;<br />
<br />
create table wibble (<br />
  row_id int not null auto_increment,<br />
  name varchar(20) not null,<br />
  image mediumblob null<br />
) @DISK_STORAGE engine=@ENGINE_NAME;<br />
<br />
and then change the variables depending on system.<br />
<br />
The select works fine but the create table doesn't. Can anyone tell me why?]]></description>
            <dc:creator>Andrew Chapman</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Tue, 11 Aug 2009 16:25:21 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,274345,274345#msg-274345</guid>
            <title>script to change PK name (1 reply)</title>
            <link>http://forums.mysql.com/read.php?155,274345,274345#msg-274345</link>
            <description><![CDATA[ I need to make a simple script to change the name of the PK of all tables, but I dont know how to get the PK column. I know how to loop through all the tables and columns but how can I know which column if PK?]]></description>
            <dc:creator>Wladimir Coka</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Tue, 04 Aug 2009 14:13:51 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,272118,272118#msg-272118</guid>
            <title>MySQL Workbench:  Lua Script to auto-create relationships for MyISAM tables (3 replies)</title>
            <link>http://forums.mysql.com/read.php?155,272118,272118#msg-272118</link>
            <description><![CDATA[ MySQL Workbench:  Lua Script to auto-create relationships for MyISAM tables<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=271">http://dev.mysql.com/workbench/?p=271</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Mon, 14 Sep 2009 07:52:59 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,262396,262396#msg-262396</guid>
            <title>SQLite export plugin for MySQL Workbench (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,262396,262396#msg-262396</link>
            <description><![CDATA[ Hi everyone,<br />
 <br />
I'd like to announce the release of my SQLite export plugin for MySQL Workbench. The plugin is available under GPL, just like the Community Edition (OSS) of Workbench for which it was developed.<br />
 <br />
With this plugin, one can combine the visual database design capabilities of MySQL Workbench together with the high-performance, stand-alone SQLite database.<br />
 <br />
The plugin creates a SQL create script from a Workbench model. It already supports some advanced features like:<br />
- Creates INTEGER PRIMARY KEY where possible (as a fast alias for rowid)<br />
- Uses the .genfkey feature of sqlite3 command-line client for foreign keys (&gt;=3.6.14 required)<br />
- Exports project metainformation, schema, table and column comments<br />
- Table and column comments are stored right in the SQLite file for persistent documentation<br />
 <br />
Since I just started this project, room for improvement is surely there.<br />
I'm always open for suggestions, bug reports or feature wishes.<br />
 <br />
Links:<br />
 <br />
SQLite export plugin for MySQL Workbench:<br />
<a rel="nofollow"  href="http://www.henlich.de/software/sqlite-export-plugin-for-mysql-workbench/">http://www.henlich.de/software/sqlite-export-plugin-for-mysql-workbench/</a><br />
 <br />
MySQL Workbench:<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/">http://dev.mysql.com/workbench/</a>]]></description>
            <dc:creator>Thomas Henlich</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Wed, 13 May 2009 14:52:54 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,262335,262335#msg-262335</guid>
            <title>parseSqlScriptFile? (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,262335,262335#msg-262335</link>
            <description><![CDATA[ G'day,<br />
I'm trying to write a plugin script that will import a mySql script file (Actually it creates a script file and then I want to import it). I have no problem with the createing part and can import the created file using the File&gt;Import&gt;Reverse Engineer MySql Create Script.. menu option, that works fine. <br />
In my script I am trying to use WbMysqlImport:parseSqlScriptFile(db_Catalog, s) to import it, since this seems to be the function that should do it. The problem is it doesn't seem to do anything and there is precious little documentation to tell me wether I'm barking up the wrong tree, so to speak.<br />
When I run my script I get the following output...<br />
Started parsing MySQL SQL script.<br />
Finished parsing MySQL SQL script. Totally processed statements:successful(0), errors(0),warnings(0).<br />
<br />
Any hints?]]></description>
            <dc:creator>Guy markey</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Wed, 13 May 2009 06:31:49 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,259545,259545#msg-259545</guid>
            <title>Setting collation and character set defaults (2 replies)</title>
            <link>http://forums.mysql.com/read.php?155,259545,259545#msg-259545</link>
            <description><![CDATA[ Where do you set the schema's collation and character set defaults in the WB GUI?<br />
<br />
I mean the two settings that are accessible by plugins internally by<br />
<br />
schema.defaultCollationName<br />
schema.defaultCharacterSetName<br />
<br />
...<br />
<br />
When editing tables, the collation dropdown &quot;Collation&quot; has &quot;Schema Default&quot; as the top entry. Where do you change this?<br />
<br />
Karsten<br />
<br />
PS: is there a reason why the collation is settable on the table and the character set isn't?]]></description>
            <dc:creator>Karsten Wutzke</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Tue, 28 Apr 2009 16:23:14 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,259543,259543#msg-259543</guid>
            <title>Default schema storage engine field? (3 replies)</title>
            <link>http://forums.mysql.com/read.php?155,259543,259543#msg-259543</link>
            <description><![CDATA[ I have the following code:<br />
<br />
-- set basic options<br />
yaml = yaml .. &quot;options:\n&quot;<br />
yaml = yaml .. &quot;  collation: &quot; .. schema.defaultCollationName .. &quot;\n&quot;<br />
yaml = yaml .. &quot;  charset: &quot; .. schema.defaultCharacterSetName .. &quot;\n&quot;<br />
yaml = yaml .. &quot;  type: &quot; .. &quot;InnoDB&quot; .. &quot;\n\n&quot;<br />
<br />
This just generates a piece of YAML code (string) by accessing MySQL Workbench schema attrributes/fiels<br />
<br />
schema.defaultCollationName<br />
schema.defaultCharacterSetName<br />
<br />
Missing:<br />
schema.defaultStorageEngineName or else<br />
<br />
Is there such a property? What's its name?<br />
<br />
I mean the one which is settable via &quot;Tools&quot; -&gt; &quot;Options...&quot; -&gt; &quot;MySQL&quot; (tab), the dropdown box calles &quot;Default Storage Engine&quot;<br />
<br />
Karsten]]></description>
            <dc:creator>Karsten Wutzke</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Tue, 28 Apr 2009 17:07:07 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,258646,258646#msg-258646</guid>
            <title>Plugin system changed? (11 replies)</title>
            <link>http://forums.mysql.com/read.php?155,258646,258646#msg-258646</link>
            <description><![CDATA[ Hello,<br />
<br />
I know two object relational mapping export plugins that work under WB 5.0 but not in WB 5.1. What changed?<br />
<br />
Where can I find info on how to fix this?<br />
<br />
I mean the Propel and Doctrine plugins mentioned here:<br />
<a rel="nofollow"  href="http://forums.mysql.com/read.php?153,208229,208229">http://forums.mysql.com/read.php?153,208229,208229</a><br />
<br />
Karsten]]></description>
            <dc:creator>Karsten Wutzke</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Fri, 24 Apr 2009 16:45:43 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,251589,251589#msg-251589</guid>
            <title>MySQL Workbench: Scripting in Python (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,251589,251589#msg-251589</link>
            <description><![CDATA[ MySQL Workbench: Scripting in Python<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=197">http://dev.mysql.com/workbench/?p=197</a><br />
<br />
MySQL Workbench: Enabling Python in the GRT shell <br />
<a rel="nofollow"  href="http://blog.some-abstract-type.com/2009/10/mysql-workbench-enabling-python-in-grt.html">http://blog.some-abstract-type.com/2009/10/mysql-workbench-enabling-python-in-grt.html</a><br />
<br />
MySQL Workbench: Running Python Scripts<br />
<a rel="nofollow"  href="http://blog.some-abstract-type.com/2009/10/running-python-scripts-within-mysql.html">http://blog.some-abstract-type.com/2009/10/running-python-scripts-within-mysql.html</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Mon, 09 Mar 2009 03:24:32 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,248477,248477#msg-248477</guid>
            <title>[REQ] Calculate Table Size (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,248477,248477#msg-248477</link>
            <description><![CDATA[ Have anybody a some script that calculate the table size in order to estimate the size average for the DB?<br />
<br />
The idea is that the script list the tables and theirs max row sizes and based in this calculate the entire DB size.<br />
<br />
Thanks]]></description>
            <dc:creator>Rodrigo Olivares</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Wed, 18 Feb 2009 12:29:02 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,245798,245798#msg-245798</guid>
            <title>LUA-Script For Batch Renaming Of Foreign Keys (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,245798,245798#msg-245798</link>
            <description><![CDATA[ LUA-Script For Batch Renaming Of Foreign Keys <br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=190">http://dev.mysql.com/workbench/?p=190</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Tue, 03 Feb 2009 15:28:50 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,245690,245690#msg-245690</guid>
            <title>Use LUA to customize SQL export (3 replies)</title>
            <link>http://forums.mysql.com/read.php?155,245690,245690#msg-245690</link>
            <description><![CDATA[ Hello,<br />
<br />
Workbenck &quot;Forward Engineer SQL Create script&quot; doesn't fits my needs.<br />
<br />
I would like to write a plugin to accomplish a few simple optimizations:<br />
<br />
1. Remove empty queries from the generated script (see bug #39929)<br />
2. Sort tables by Layer and then Name<br />
3. Sort Routines by Layer, Group and then Name<br />
<br />
Is this possible? May someone point me to some related documentation/examples to start working on?<br />
<br />
I'm new on LUA scripting.<br />
<br />
Thank you]]></description>
            <dc:creator>Gabriele Tozzi</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Wed, 04 Feb 2009 15:56:04 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,240324,240324#msg-240324</guid>
            <title>Timestamp format (1 reply)</title>
            <link>http://forums.mysql.com/read.php?155,240324,240324#msg-240324</link>
            <description><![CDATA[ Hi, how do I alter the timestamp code so that  only the year as in YY is displayed in the mysql column, as in if its 2008, only 08 should appear]]></description>
            <dc:creator>Kalpana Kanthasamy</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Tue, 30 Dec 2008 18:56:36 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,238317,238317#msg-238317</guid>
            <title>MySQL Workbench Plugin Tutorial: Load INSERTs from a File (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,238317,238317#msg-238317</link>
            <description><![CDATA[ MySQL Workbench Plugin Tutorial: Load INSERTs from a File<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=176">http://dev.mysql.com/workbench/?p=176</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Sat, 13 Dec 2008 00:10:36 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,233349,233349#msg-233349</guid>
            <title>MySQL Workbench:  Lua Library for writing Custom Plugins (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,233349,233349#msg-233349</link>
            <description><![CDATA[ MySQL Workbench:  Lua Library for writing Custom Plugins<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=166">http://dev.mysql.com/workbench/?p=166</a><br />
<br />
MySQL Workbench: Lua Plugin Support<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=60">http://dev.mysql.com/workbench/?p=60</a><br />
<br />
Pimp My Workbench (writing Lua plugins)<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=148">http://dev.mysql.com/workbench/?p=148</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Fri, 07 Nov 2008 21:48:44 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,232381,232381#msg-232381</guid>
            <title>Workbench (2 replies)</title>
            <link>http://forums.mysql.com/read.php?155,232381,232381#msg-232381</link>
            <description><![CDATA[ What can I do with Workbench?<br />
<br />
So far I've seen:<br />
<br />
Workbench:input(&quot;Text&quot;) that shows an input dialog with &quot;Text&quot; title and returns the text entered into the dialog<br />
<br />
Workbench:confirm(&quot;text&quot;,&quot;text&quot;) that shows a confirmation dialog.<br />
<br />
Workbench:copyToClipboard(&quot;text&quot;) that copies text to the clipboard.<br />
<br />
However I failed to find any document about other capabilities.<br />
<br />
Thanks in advance<br />
<br />
Julian]]></description>
            <dc:creator>Julian Santander</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Wed, 05 Nov 2008 07:43:39 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,232379,232379#msg-232379</guid>
            <title>XML (2 replies)</title>
            <link>http://forums.mysql.com/read.php?155,232379,232379#msg-232379</link>
            <description><![CDATA[ How can I read XML (any XML document) and write XML (any XML) from a plugin/script?<br />
<br />
To give more details. I have a proprietary schema design tool that stores data in XML files. I'd like to go to/from the MySQL Workbench.<br />
<br />
I guess writing is the easy part... just printing appropriately formated strings.<br />
<br />
I tried adding the LuaExpat library to the Lua environment but I got an MSF error (but I only get the error from the workbench or from the MySQLGrtCppShell.exe... but not from the MySQLGrtShell.exe).<br />
<br />
I noticed that libxml2.dll is present... so I wonder if it is accessible in any way from the plugins/scripts.<br />
<br />
As you can imagine this is on Windows environment. And I'm using 5.0.26 OSS<br />
<br />
Thanks in advance<br />
<br />
Julian]]></description>
            <dc:creator>Julian Santander</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Fri, 31 Oct 2008 19:39:04 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,231368,231368#msg-231368</guid>
            <title>Use LUA to merge tables into layers (3 replies)</title>
            <link>http://forums.mysql.com/read.php?155,231368,231368#msg-231368</link>
            <description><![CDATA[ How can I create a layer/and or group existing tables with a prefix into a particular layer? I have a large database and grouping by layers would be an extremely useful.<br />
<br />
Also is there any particular reason that reverse engineering schemas is disabled or has this not yet been implemented?<br />
<br />
Thanks<br />
<br />
Andrew]]></description>
            <dc:creator>Andrew Johnstone</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Thu, 30 Oct 2008 10:24:44 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,229050,229050#msg-229050</guid>
            <title>Module information (1 reply)</title>
            <link>http://forums.mysql.com/read.php?155,229050,229050#msg-229050</link>
            <description><![CDATA[ Hi<br />
<br />
is there already a possibility to see some module information?<br />
Like a small description and how and which arguments it modules expects?<br />
<br />
Thanks in advance!<br />
<br />
Kind regards<br />
Hans Stevens]]></description>
            <dc:creator>Hans Stevens</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Mon, 06 Oct 2008 16:40:44 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,226311,226311#msg-226311</guid>
            <title>Symfony Export Plugin (1 reply)</title>
            <link>http://forums.mysql.com/read.php?155,226311,226311#msg-226311</link>
            <description><![CDATA[ on<br />
<a rel="nofollow"  href="http://trac.symfony-project.org/wiki/SymfonyYamlMyqlWorkbenchPlugin">http://trac.symfony-project.org/wiki/SymfonyYamlMyqlWorkbenchPlugin</a><br />
<br />
you'll find a  workbench symfony export plugin coded by jason rowe.]]></description>
            <dc:creator>Johannes Mueller</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Fri, 12 Sep 2008 20:59:36 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,225437,225437#msg-225437</guid>
            <title>MySQL Workbench - Plugins, Scripts, Modules:  Articles, Blogs, FAQs (no replies)</title>
            <link>http://forums.mysql.com/read.php?155,225437,225437#msg-225437</link>
            <description><![CDATA[ MySQL Workbench:  Plugins<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?cat=4">http://dev.mysql.com/workbench/?cat=4</a><br />
<br />
MySQL Workbench: Scripting in Python<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=197">http://dev.mysql.com/workbench/?p=197</a><br />
<br />
MySQL Workbench:  Lua Library for writing Custom Plugins<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=166">http://dev.mysql.com/workbench/?p=166</a><br />
<br />
Pimp My Workbench (writing Lua plugins)<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=148">http://dev.mysql.com/workbench/?p=148</a><br />
<br />
MySQL Workbench Plugin Tutorial: Load INSERTs from a File<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=176">http://dev.mysql.com/workbench/?p=176</a><br />
<br />
MySQL Workbench:  LUA-Script For Batch Renaming Of Foreign Keys <br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=190">http://dev.mysql.com/workbench/?p=190</a><br />
<br />
MySQL Workbench:  Automate Figure Arrangement<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=164">http://dev.mysql.com/workbench/?p=164</a><br />
<br />
MySQL Workbench:  Lua Script to auto-create relationships for MyISAM tables<br />
<a rel="nofollow"  href="http://dev.mysql.com/workbench/?p=271">http://dev.mysql.com/workbench/?p=271</a>]]></description>
            <dc:creator>Edwin DeSouza</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Fri, 05 Sep 2008 20:51:33 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,221258,221258#msg-221258</guid>
            <title>Workbench DoctrineExport plugin (1 reply)</title>
            <link>http://forums.mysql.com/read.php?155,221258,221258#msg-221258</link>
            <description><![CDATA[ accoring to PropelExport plugin i release an early alpha version of a Doctrine Export Plugin for YAML schemes.<br />
<br />
feel free to download:<br />
<a rel="nofollow"  href="http://www.tahat.de/downloads/DoctrineExport.grt.lua">http://www.tahat.de/downloads/DoctrineExport.grt.lua</a><br />
<br />
If you have questions, suggestions or want to fix a bug. you can contact me via email, which is written in the plugin-code.]]></description>
            <dc:creator>Johannes Mueller</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Tue, 05 Aug 2008 19:31:58 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?155,220953,220953#msg-220953</guid>
            <title>db.Column.flags doesn't work properly?? (2 replies)</title>
            <link>http://forums.mysql.com/read.php?155,220953,220953#msg-220953</link>
            <description><![CDATA[ hi, i've tried to program a plugin in LUA, but it seems to me like there is a problem with db.Column.flags. I expected it to return a list of strings, instead it returns a list of userdata. Which means i can not compare the flags with strings like i want:<br />
<br />
local i, flag<br />
for i=1, getV.getn(catalog.schemata[x].tables[y].columns[z].flags) do<br />
   flag = catalog.schemata[x].tables[y].columns[z].flags[i]<br />
   if ( flag == &quot;UNSIGNED&quot; ) do<br />
      -- do something<br />
   end<br />
end<br />
<br />
Am i correct, or do i have to convert it (but how)? I think in the documentation it's mentioned to be a list of strings. But i'm unsure - so i didn't open a Bug report.]]></description>
            <dc:creator>Johannes Mueller</dc:creator>
            <category>Workbench - Plugins &amp; Scripts</category>
            <pubDate>Tue, 05 Aug 2008 15:52:55 +0000</pubDate>
        </item>
    </channel>
</rss>
