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

Sqlite Migrations: Support HasComment() #16820

Closed
bricelam opened this issue Jul 29, 2019 · 0 comments
Closed

Sqlite Migrations: Support HasComment() #16820

bricelam opened this issue Jul 29, 2019 · 0 comments
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. good first issue This issue should be relatively straightforward to fix. type-enhancement
Milestone

Comments

@bricelam
Copy link
Contributor

bricelam commented Jul 29, 2019

modelBuilder.Entity<MyEntity>().Property(e => e.MyProperty).HasComment("My comment");

...should generate...

CREATE TABLE MyEntity (
    ...

    -- My comment
    MyProperty TEXT,

    ...
);

Users can see the full create statement (including comments) using the following SQL:

SELECT sql
FROM sqlite_master
WHERE name = 'MyEntity';
@bricelam bricelam self-assigned this Jul 29, 2019
@ajcvickers ajcvickers added this to the Backlog milestone Aug 5, 2019
@ajcvickers ajcvickers added the good first issue This issue should be relatively straightforward to fix. label Aug 5, 2019
skalpin added a commit to skalpin/EntityFrameworkCore that referenced this issue Aug 15, 2019
skalpin added a commit to skalpin/EntityFrameworkCore that referenced this issue Aug 16, 2019
skalpin added a commit to skalpin/EntityFrameworkCore that referenced this issue Aug 16, 2019
This only works with create table. Alter table commands do not preserve
comments.

Related issue: dotnet#16820
skalpin added a commit to skalpin/EntityFrameworkCore that referenced this issue Aug 16, 2019
This only works with create table. Alter table commands do not preserve
comments.

Fixes dotnet#16820
skalpin added a commit to skalpin/EntityFrameworkCore that referenced this issue Aug 16, 2019
If comments are included, each column will be spaced.
Table comments are not preserved.

Fixes dotnet#16820
skalpin added a commit to skalpin/EntityFrameworkCore that referenced this issue Aug 17, 2019
If comments are included, each column will be spaced.
Table comments are not preserved.

Fixes dotnet#16820
skalpin added a commit to skalpin/EntityFrameworkCore that referenced this issue Aug 17, 2019
- This only works with create table. Alter table commands do not
preserve comments.
- If comments are included, each column will be spaced.
- Table comments
- Column comments

Fixes dotnet#16820
@bricelam bricelam modified the milestones: Backlog, 3.0.0 Aug 19, 2019
@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Aug 19, 2019
smitpatel pushed a commit that referenced this issue Aug 21, 2019
- This only works with create table. Alter table commands do not
preserve comments.
- If comments are included, each column will be spaced.
- Table comments
- Column comments

Fixes #16820
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview9 Aug 21, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview9, 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. good first issue This issue should be relatively straightforward to fix. type-enhancement
Projects
None yet
Development

No branches or pull requests

2 participants