Powerdesigner generates comment comments for MySQL PDM

Source: Internet
Author: User
Tags powerdesigner
Document directory
  • Powerdesigner generates comment comments for MySQL PDM
Powerdesigner generates comment comments for MySQL PDM

No comments are generated for the default PD, which can be modified as follows for MySQL.
In database --> edit current DBMS...

Set the DBMS attributes and find mysql5.0 --> script --> objects --> column --> Add

Put the original content:

% 20: column % [% National %? National] % datatype % [% unsigned %? Unsigned] [% zerofill %? Zerofill] [[. O: [character set] [charset] % charset %] [. Z: [% notnull %] [% identity %? Auto_increment: [Default % default %] [comment %. Q: @ objtlabl %]

 

Changed:

% 20: column % [% National %? National] % datatype % [% unsigned %? Unsigned] [% zerofill %? Zerofill] [[. O: [character set] [charset] % charset %] [. Z: [% notnull %] [% identity %? Auto_increment: [Default % default %] [comment %. Q: Comment %]

 

In fact, only the final objtlabl can be changed to comment. In the past, objtlabl did not know what it meant. If you knew it, please let me know...

In this way, every field of the generated code is annotated:

Create Table Code
(
Code_id integer not null comment 'Code id ',
Code_no varchar (10) Not null comment 'Code encoding ',
Code_chinese_name varchar (50) not null comment 'Chinese name ',
Code_english varchar (50) Comment 'English name ',
Parent_code_id integer comment 'parent code id ',
Code_type varchar (50) Comment 'Code type ',
Sort_no integer comment 'Code sequence number ',
Create_by integer comment 'record creator ',
Create_date timestamp comment 'record creation time ',
Update_by integer comment 'record updater ',
Update_date timestamp comment 'record update time ',
Primary Key (code_id)
);
 

Table comment:

Set the DBMS attributes and find mysql5.0 --> script --> objects --> table --> tablecomment:

Add the following content in value:

Alter table [% qualifier %] % table % comment %. 60qa: Comment %

 

The following statement is generated after the addition:

Alter table code comment 'Code table ';

 

Code Generation:

Click database --> Generate Database

The database generation screen is displayed. On the format tab page, select generate name in empty comment.

Click OK to generate the corresponding code, and the above comments will appear in the code.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.