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

Can't do memory-optimized tables with comments #16800

Closed
roji opened this issue Jul 28, 2019 · 1 comment · Fixed by #16828
Closed

Can't do memory-optimized tables with comments #16800

roji opened this issue Jul 28, 2019 · 1 comment · Fixed by #16828
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@roji
Copy link
Member

roji commented Jul 28, 2019

SqlServer's migrations generator for CreateTable and AddColumn call base and then tacks on WITH (MEMORY_OPTIMIZED = ON). But the base implementation now renders comments as well, which are different statements, so we get mangled SQL.

This makes me question the general model of optionally terminating or not - in Npgsql I never use it, since I typically have to insert SQL in the middle anyway, so I end up duplicating the SQL. There are still some places in SqlServer where terminate false is used without bugs (e.g. AddForeignKey) but I'm not sure it's worth it.

What generally works better IMHO is separating out logic for fragments inside statements, e.g. CreateTableColumn, CreateTableConstraints, GenerateComment.

We can consider removing this, or fix CreateTable and AddColumn specifically.

@roji roji added the type-bug label Jul 28, 2019
@roji
Copy link
Member Author

roji commented Jul 28, 2019

/cc @bricelam

@ajcvickers ajcvickers added this to the Backlog milestone Jul 29, 2019
roji added a commit that referenced this issue Jul 29, 2019
* Removed comment-related migration generation APIs from relational,
  implementation is now only in SqlServerMigrationsSqlGenerator.
* Made extended property support more general so we can use them
  for other purposes if needed.

Fixes #16799
Fixes #16800
roji added a commit that referenced this issue Jul 29, 2019
* Removed comment-related migration generation APIs from relational,
  implementation is now only in SqlServerMigrationsSqlGenerator.
* Made extended property support more general so we can use them
  for other purposes if needed.

Fixes #16799
Fixes #16800
@roji roji modified the milestones: Backlog, 3.0.0 Jul 29, 2019
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jul 29, 2019
@roji roji self-assigned this Jul 29, 2019
@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. type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants