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

SqlServer Migrations: Consolidate IDENTITY annotations #16921

Merged
merged 1 commit into from
Aug 5, 2019
Merged

SqlServer Migrations: Consolidate IDENTITY annotations #16921

merged 1 commit into from
Aug 5, 2019

Conversation

bricelam
Copy link
Contributor

@bricelam bricelam commented Aug 2, 2019

Note, this introduces a breaking change from 3.0.0-preview7. Migrations with the following...

.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn)
.Annotation("SqlServer:IdentitySeed", 2)
.Annotation("SqlServer:IdentityIncrement", 3)

...will need to be manually updated to this.

.Annotation("SqlServer:Identity", "2, 3")

Fixes #13352

@bricelam
Copy link
Contributor Author

bricelam commented Aug 2, 2019

@ajcvickers Worth handling 3.0.0-preview7 migraitons?

@ajcvickers
Copy link
Member

@bricelam Pre-3.0 migrations still work, right? How about a preview 7 migration that didn't specify seed or increment? (In other words, if it's only when seed/increment are set that it won't work, then I think that's fine, since I've never actually seen those set in the wild, so I think it's pretty rare.)

@bricelam
Copy link
Contributor Author

bricelam commented Aug 3, 2019

Correct, only when seed and increment (introduced in 3.0) are specified.

@bricelam bricelam merged commit 46d979a into dotnet:release/3.0 Aug 5, 2019
@bricelam bricelam deleted the identity branch August 5, 2019 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SqlServer Migrations: Consolidate ValueGenerationStrategy, IdentitySeed & IdentityIncrement
3 participants