EF Migrations `Down()` method
For migrations EntityFramework has two methods: Up() and Down().
First should apply migration to DB, second revert it.
But what the benefits/idea of Down() method?
There are no real scenarios in life when it would be necessary to use it.
If you apply several migrations (for ex. 10) to database and after this user add some new data and after some time you want revert changes with method Down(), Down() method will never work fine, because it can miss or break users data. Instead of reverting applied migrations better add new one, that will fix errors correctly.
So, now people not correctly use method Down(), they write inside of it code that may be can revert migrations in ideal world, where users never add data to database and after all this they never call the method, so people just waste time for writing usefulness code.
@ichensky I don't fundamentally disagree with you. I don't think I would ever use Down on a production database. However, the common use for this is during development where you make a migration, apply it to a test database, test it, decide it wasn't quite right, so revert it, adjust the changes and re-apply it.