Solve the problem that ER\Studio cannot generate mysql column comments

foreword

Recently, I switched to ER\Studio for modeling, and found that ER\Studio does not support the generation of mysql column comments. I read online that it can be checked, and then there is no such check option when generating mysql. I tried to generate Oracle and DB2. ...

If there is no annotation, then the annotation of the entity bean needs to be hand-coded? ...no no no

So start remodeling

The plan is to divide the generation of mysql into two steps. The first step is to generate the mysql file normally, the second step is to generate the sql file of DB2, and then the independent mysql column comment statement is extracted and transformed through the tool, so easy~~

demo

Execute tool jar

#################################################################

此工具用于解决ER/Studio设置注释definition依然无法生成Mysql的列注释问题
整体步骤:
1、使用ER/Studio生成Mysql的sql在数据库建表
2、使用ER/Studio生成DB2的sql文件
3、通过java jar db2sqlConvert2MysqlComment.jar 启动运行此工具
4、按提示输入db2sql文件的路径,回车将会在同目录生成mysql添加注释的文件
5、在步骤1的数据库实例下执行此mysql添加注释的sql文件
~~完 毕!

#################################################################
请输入db2sql路径:

Drag the db2sql file over and press Enter ok


#################################################################
请输入db2sql路径:E:\images\db2\db2.sql
输入数据:E:\images\db2\db2.sql
success create file,the file is E:\images\db2\db2_sql_mysqlcomment_1525835377513
.sql

Open the file and see the result

alter table tab_user modify column id  int comment  '用户主键'
;

 

Baidu network disk: ER\Studio and solve the problem of unable to generate mysql column annotation tool  download

I haven't done the limit test, you can debug and modify it yourself or leave a message.

Source: GO

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326157879&siteId=291194637