Closed filenda closed 1 year ago
@vfilenga The first case should execute all migrations that have not been applied from the initial upto and including the one specified. The second case should do nothing, since migrating from the last migration to the last migration is a no-op. If you are seeing behaviors different from these, then can you please post a runnable project/solution that demonstrates the behavior you are seeing?
@ajcvickers What is weird about the first case is that the last applied migration (see below)
the immediate next one is exactly the one I'm want it to apply
Select from database:
Migrations folder:
EDIT: Worked around it. Commented all "UP" methods from every previous migration in the folder to bypass them.
@vfilenga We have not been able to reproduce this. Can you post a runnable project/solution that demonstrates the behavior you are seeing?
EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it.
BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions.
Error presented: Generated script seems to be using Initial migraiton instead of last one, even if forced to do so (see below)
Table 'Activities' already exists
Update-Database generates script not compatible with last migration. And Script-Migration --From LastMigrationName is empty
Migration expected to be run:
Steps to reproduce
Add the above migration to the Migrations folder of your project and run the following commands:
Update-Database -Migration "20180815" Script-Migration -From 20180815
Neither should word
Further technical details
EF Core version: 2.0.1 Database Provider: Pomelo.EntityFrameworkCore.Mysql (2.0.1) Operating system: Win10 x64 IDE: (e.g. Visual Studio 2017 15.4)