I found that running the following script
truncate table __MigrationHistory
in the database removes this problem when your / db code does not sync.
Perhaps I'm just used to the old school, building and messing around with the database design, changing the code accordingly or finding that I need a new field when coding, etc ... just add in both places.
I admit that I am new to (ish) before MVC
, but sometimes such functions are useless because they hide how everything works at a fundamental level. When you understand how everything fits together, itโs all good to have generators and tools to help, but at startup ... I donโt think itโs good.
I came across many developers who do not understand simple concepts due to the use of code generators, wizards, etc., when it comes to actually programming or keeping obsolete systems, they are a little lost.
source share