C# Code-First migration, up/down?

The Up method upgrades your database from its current state (represented by your previous migration) to the state expected by your current code migration. The Down method does the reverse operation – it removes all the changes from the current migration and reverts database to the state expected by the previous migration. It’s like installing / uninstalling the migration. Only one of these methods is executed when you call update-database. To use the Down method you must explicitly specify the target migration for your upgrade. If the target migration is the old one, the migration API will automatically use the Down method and downgrade your database.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)