codefirst 根据代码注释,迁移到数据库备注

This commit is contained in:
28810
2019-06-14 18:14:14 +08:00
parent 38d51a809d
commit 5ce51bc310
9 changed files with 452 additions and 0 deletions

View File

@ -119,6 +119,7 @@ namespace FreeSql.MySql {
sb.Append(" \r\n ").Append(_commonUtils.QuoteSqlName(tbcol.Attribute.Name)).Append(" ");
sb.Append(tbcol.Attribute.DbType);
if (tbcol.Attribute.IsIdentity == true && tbcol.Attribute.DbType.IndexOf("AUTO_INCREMENT", StringComparison.CurrentCultureIgnoreCase) == -1) sb.Append(" AUTO_INCREMENT");
if (string.IsNullOrEmpty(tbcol.Comment) == false) sb.Append(" COMMENT ").Append(_commonUtils.FormatSql("{0}", tbcol.Comment));
sb.Append(",");
}
if (tb.Primarys.Any()) {