Created
March 15, 2010 18:29
-
-
Save chetan/333147 to your computer and use it in GitHub Desktop.
lua script for mysql workbench to clear charset and collation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function clearCharSetAndCollation() | |
local schemata = grtV.getGlobal("/wb/doc/physicalModels/0/catalog/schemata") | |
local s | |
local tables | |
local t | |
for s=1, grtV.getn(schemata) do | |
print(schemata[s].name .. "\n") | |
tables = schemata[s].tables | |
for t=1, grtV.getn(tables) do | |
print(" " .. tables[t].name .. "\n") | |
tables[t].defaultCharacterSetName = "" | |
tables[t].defaultCollationName = "" | |
end | |
end | |
return 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment