/ Published in: Python
Name this script whatever you want, and run it via Workbench Scripting shell
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# -*- coding: utf-8 -*- # MySQL Workbench Python script # <description> # Written in MySQL Workbench 6.3.6 import grt for table in schema.tables: column = grt.classes.db_mysql_Column() column.name = "created" table.addColumn(column) column.setParseType("TIMESTAMP", None) column.defaultValue = "CURRENT_TIMESTAMP" column = grt.classes.db_mysql_Column() column.name = "modified" table.addColumn(column) column.setParseType("TIMESTAMP", None)