powerdesigner中如何定制自己的Physical Options

Physical Options定义了几乎所有的建表是需要指定的设置,如Oracle的Tablespace,mysql的存储引擎类型type等。在使用mysql时可能需要指定表使用的字符集,但PD的默认设置里面是没有这个设置项的。

方法:

在安装目录下找到PowerDesigner 15/Resource Files/DBMS/mysql50.xdb文件,找到

[%OPTIONS%]
</a:TextTargetItem.Value>
<a:Comment>Command for creating a table. Example: create table %TABLE%</a:Comment>
</o:TextTargetItem>
<o:TextTargetItem Id="o49">
<a:Name>Options</a:Name>
<a:TextTargetItem.Value>type = %s : list = BDB | HEAP | ISAM | InnoDB | MERGE | MRG_MYISAM | MYISAM, default = ISAM
auto_increment = %d
avg_row_length = %d

在后面加上:

charset = %s : list = UTF8 | GBK | GB2312, default = UTF8

然后还要选择 Database -> Change the target DBMS -> Copy the DBMS definition in model

好了,重启PD试试吧

猜你喜欢

转载自strongant.iteye.com/blog/2149503