PowerDesigner
1.
PowerDesigner 批量添加字段
tools->execute commands-> edit/run script
Option Explicit Dim mdl ' the current model Set mdl = ActiveModel Dim Tab 'running table Dim col_1 Dim col_2 Dim col_3 Dim col_4 ' 定义属性变量 for each Tab in ActiveModel.Tables Set col_1 = Tab.Columns.CreateNew Set col_2 = Tab.Columns.CreateNew Set col_3 = Tab.Columns.CreateNew Set col_4 = Tab.Columns.CreateNew '添加公共字段 by Sinu col_1.name = "创建人" col_1.code = "created_user" col_1.DataType = "varchar(50)" col_1.comment= "创建人" col_2.name = "创建时间" col_2.code = "created_date" col_2.DataType = "datetime" col_2.comment= "创建时间" col_3.name = "修改人" col_3.code = "modified_user" col_3.DataType = "varchar(50)" col_3.comment= "修改人" col_4.name = "修改时间" col_4.code = "modified_date" col_4.DataType = "datetime" col_4.comment= "修改时间" next MsgBox "success"