So our team has implemented a Windows self-hosted Azure DevOps testing pipeline. It was working well until we ran the backend tests for a branch that had a database migration. Although the tests passed as expect, this migration changed the agent's database. This resulted in every subsequent integration test run on the master branch to fail. Normally it would just 'down' the migration and it would be fine but here that migration doesn't exist since it was in a branch that hasn't been merged into master yet.
I've looked at a bunch of other posts about EF migrations and they all seem to talk about release pipelines and creating new migrations. All I want to do is have a step at the end of my pipeline that can update the database to whatever master's most recent migration is. However, I can't figure out how to do that since I don't have access to the NuGet Packet Manager Console. Does anyone know how I might go about updating the database to the appropriate migration? I am also pretty new to Azure DevOps pipelines so please let me know if this is misguided for whatever reason. Thank you for your help and please let me know if I can provide any more information.
If it is any help this is what we would use to update the database based on a given target migration in the NuGet Packet Manager Console:
Update-Database -projectName <projectName> -targetMigration <targetMigration> -configurationTypeName <configurationType> -connectionStringName <connectionString>