I want to run an alter database query on the Schema I am designing in the Workbench software.
is this at all possible?
I want to run this in the Workbench Scripting Shell on the Schema called “BACKDOOR” within the Table called “SATURDAY”
"alter table SATURDAY add column flavor"
It does not work for me though :
File "<string>", line 1
alter table SATURDAY add column flavor
^
SyntaxError: invalid syntax
Error executing script.
I do not have MySQL Installed on this pc. Im am going on the basis that the code snippets in the Workbench Scripter work fine eg
schema = grt.root.wb.doc.physicalModels[0].catalog.schemata[0]
for table in schema.tables:
print table.name
This gives me all the table names from the database I’m designing in the Workbench software.
I guess I need to wrap my SQL statement in a similar fashion to the snippet.
The proper syntax for adding a column on a table is slightly different in MySQL (MySQL ALTER TABLE examples):