How the mgiration works internally?
For example, I have 5 migrations added and the sql database is updated with those 5 migrations. For some reasons, I had to roll back to the first migration by removing the four migrations. Now the question is
- How does EF core works to which migration to roll back? My understanding is they compare with MigraitonHistory Table in the sql and check with snapshot.cs file to compare?
- How Down methods are executed? I updated to the first migration means 4 migrations down methods are executed or not?
- How the design.cs and snapshot.cs are used when updating the db using EF core? I think snapshot shows the current snapshot without the recent migration and design.cs has the data including the relevant migraiton file.
Could you guys fill me up?