Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow table/column comments to be specified in the model #15037

Closed
QJesus opened this issue Mar 15, 2019 · 6 comments · Fixed by #15767
Closed

Allow table/column comments to be specified in the model #15037

QJesus opened this issue Mar 15, 2019 · 6 comments · Fixed by #15767
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. type-enhancement
Milestone

Comments

@QJesus
Copy link

QJesus commented Mar 15, 2019

env:
EntityFrameworkCore.Tools 2.2.3
MySql.Data.EntityFrameworkCore 8.0.15

DROP TABLE IF EXISTS `demo`;
CREATE TABLE `demo`  (
  `aaa` varchar(150) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'HOW TO ADD COMMENT',
  --                                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  `bbb` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  PRIMARY KEY (`aaa`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
@roji
Copy link
Member

roji commented Mar 15, 2019

FWIW this exists on PostgreSQL and is supported by Npgsql (although the SQL is different): npgsql/efcore.pg#135.

@ajcvickers
Copy link
Contributor

Notes from triage: It would be good to port this from the Npgsql provider so that it is general relational functionality that can be used by any relational provider.

@ajcvickers ajcvickers changed the title Is there a way to generate sql with a COMMENT ?? Allow table/column comments to be specified in the model Mar 15, 2019
@ajcvickers ajcvickers added this to the Backlog milestone Mar 15, 2019
@ajcvickers ajcvickers added type-enhancement help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. customer-reported labels Mar 15, 2019
@Muppets
Copy link
Contributor

Muppets commented Apr 20, 2019

For SQL Server provider, would we imagine this being supported with extendedproperties?

https://stackoverflow.com/questions/4586842/sql-comments-on-create-table-on-sql-server-2008

@divega divega added good first issue This issue should be relatively straightforward to fix. help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. and removed help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. good first issue This issue should be relatively straightforward to fix. labels May 31, 2019
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 17, 2019
@AndriySvyryd AndriySvyryd modified the milestones: Backlog, 3.0.0 Jun 17, 2019
@ErikEJ
Copy link
Contributor

ErikEJ commented Jun 24, 2019

are there any plans relating to reverse engineering for this?
Is this documented?

@divega
Copy link
Contributor

divega commented Jun 24, 2019

@ErikEJ I think this is a good question. Can you please create a new issue to track that? (unless you are able to find one).

@NeilBostrom
Copy link

I've not added any documentation for it yet.

I also remember seeing some comments on supporting DescriptionAttribute, but I can't for the life of me find this now.

@ajcvickers ajcvickers modified the milestones: 3.0.0-preview7, 3.0.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported help wanted This issue involves technologies where we are not experts. Expert help would be appreciated. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants