ENH: Add @DbComment with DDL generation of table and column comments
using FileWriter may cause messy code when write out see# com.avaje.ebeaninternal.server.ddl.DdlGenerator.writeFile maybe should use FileOutputStream to solve this
/* FileWriter fw = new FileWriter(f);
try {
fw.write(fileContent);
fw.flush();
} finally {
fw.close();
}*/
FileOutputStream out = null;
try {
out = new FileOutputStream(f, false);
out.write(fileContent.getBytes("UTF-8"));
out.flush();
} finally {
out.close();
}
What do you mean by 'messy code'? Do you mean some problem with UTF8 encoding?
As below, the COMMENT will be ??? or some other messy code generated , not the UTF8 encoding
@Column(columnDefinition = "varchar(30) COMMENT'角色名称'")
private String name;
Additionally , Can Ebean provide annotation @Comment to add COMMENT to table gen ,not the current way in the columnDefinition part
DB Migration has column comments? @rbygrave
Yes but they are not used in 'diff'.
On 9 December 2015 at 17:31, icode [email protected] wrote:
DB Migration has column comments? @rbygrave https://github.com/rbygrave
— Reply to this email directly or view it on GitHub https://github.com/ebean-orm/avaje-ebeanorm/issues/365#issuecomment-163106514 .
I don't understand for DbMigration, DbMigration how to know the current database versio? I'm not see a dbversion table.