how to rename a migration in entity framework core

entity-framework entity-framework-core

Question

How could I change the name of an old migration (rename it)? It conflicts with the name of my custom identity user.

Would changing the identity user be easier? I have no idea how to rename that either, every tutorial out there just create a new db for the sake of simplicity (any information about that is appreciated too).

Is it as simple as renaming it in:

  • it's migration .cs file
  • the db migration table
  • the snapshot

Is that it? Any idea if this could screw things up?

1
2
11/22/2018 3:40:20 PM

Accepted Answer

If it's just the class name conflicting, only renaming the class should be sufficient.

If you really want to rename the whole migration, your steps look correct. Make sure you check the *.Designer.cs file to rename the string literal containing the name.

4
5/26/2017 3:57:45 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow