Skip to content

Migration tool for Enum to string attempts to alter column on every migration #11343

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

Closed
ctrlaltdan opened this issue Mar 20, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@ctrlaltdan
Copy link

Issue with migrations tool attempting to alter string enum property on every add-migration step when using HasConversion<string>().

Steps to reproduce

  • Create an entity with an enum property
  • Add the .HasConversion<string>() to the model builder
  • Add a migration (works fine)
  • Add an additional migration (tool attempts to alter already correct property)

Repro

https://github.com/dubs999/efcore-string-enum-bug

Further technical details

EF Core version: 2.1.0-preview-1
Database Provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Operating system:
IDE: (e.g. Visual Studio 2017 15.4)

@ajcvickers ajcvickers added this to the 2.1.0 milestone Mar 21, 2018
@divega divega modified the milestones: 2.1.0-preview2, 2.1.0 Apr 2, 2018
@bricelam bricelam removed the poachable label Apr 3, 2018
@bricelam
Copy link
Contributor

bricelam commented Apr 3, 2018

Related to #11297. Snapshot should contain .IsRequired() on the converted property.

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

No branches or pull requests

4 participants