Skip to content

Instantly share code, notes, and snippets.

@chetan
Created March 15, 2010 18:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chetan/333147 to your computer and use it in GitHub Desktop.
Save chetan/333147 to your computer and use it in GitHub Desktop.
lua script for mysql workbench to clear charset and collation
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