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

Set PostgreSQL comments on tables and columns #135

Closed
smigalni opened this issue Dec 16, 2016 · 7 comments
Closed

Set PostgreSQL comments on tables and columns #135

smigalni opened this issue Dec 16, 2016 · 7 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@smigalni
Copy link

Hi,
How to write Comments on Columns using dotnet core Web API with Entity Framework core with PostgreSQL.
I am using dotnet core with Npgsql v3.1.9 and Npgsql.EntityFrameworkCore.PostgreSQL v1.1.0 with postgreSQL 9.6.0.

Is it possible at all?

best regards Sergey

@roji
Copy link
Member

roji commented Dec 16, 2016

You'll have to provide more info on what you want to do, what do you mean by "comments on columns"? Can you provide an example?

@smigalni
Copy link
Author

I am trying to do something like this:
COMMENT ON COLUMN my_table.my_column IS 'Employee ID number';

I would like to provide some comments for meg columns in the database when I do Code First approach.

@roji
Copy link
Member

roji commented Dec 16, 2016

This is currently not supported in the EF Core provider, but it's a pretty good suggestion! I'll try to do it for 1.2.

@roji roji added enhancement New feature or request and removed waiting for answer labels Dec 16, 2016
@roji roji self-assigned this Dec 16, 2016
@roji roji added this to the 1.2.0 milestone Dec 16, 2016
@roji
Copy link
Member

roji commented Dec 16, 2016

BTW, as a workaround, you can always use raw SQL in migrations to add comments to your tables, columns or anything else.

@roji roji closed this as completed in 69950c8 Dec 16, 2016
@roji roji changed the title Impossible to write comments on columns Set comments on tables and columns Dec 16, 2016
@roji roji changed the title Set comments on tables and columns Set PostgreSQL comments on tables and columns Dec 16, 2016
roji added a commit that referenced this issue Dec 16, 2016
@smigalni
Copy link
Author

Thanks. Completly forgot about raw SQL.

@roji
Copy link
Member

roji commented Dec 19, 2016

Have completed support for this, will be released in 1.2.

@tetri
Copy link

tetri commented Sep 8, 2021

Thanks. Completly forgot about raw SQL.

same here

shame on me lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants