schema comment: load column comment, pass to atlas migration
Context: We uses atlas to generate versioned migration .sql files.
Problem:
The columns' comments defined in schema are not generated to ent/migrate/schema.go. Thus, the .sql files generated by atlas doesn't contain column comments such as (name varchar(255) NOT NULL COMMENT "name of entity") in MySQL.
ummm..., I may need your help to pass the unit tests. I think those failed tests are not related to my changes.
Thanks for the contribution @CharlesGe129 🙏
PR looks fine to me, but integration tests fail. Can you please try to rebase your branch on master? If it won't work, I'll pull the changes and try this.
Thanks for this PR @CharlesGe129 .
I think I just rebased and updated this PR. Could you please check again? Not sure if I followed the right process.
@a8m Sorry to bother again. I'm unable to fix the integration tests but I think it might be unrelated to the code I changed. Could you please check what's going on and tell me how may I help to solve that? Thanks!
Related issues: #2550 #2217 #1627 #1546
The issue was resolved with: https://entgo.io/docs/schema-annotations#database-comments.
Update your Ent version to master, and check out this tweet to see an example: https://twitter.com/entgo_io/status/1607394587009589248