I am currently in the progress of setting up a team environment for ASP.NET Core WebAPI development, using xUnit for unit tests in combination with GitLab CI. For database communication, we use EF Core.
For EF Core we are going to use Code First Migrations and we are worried that a developer might only update the model and not also create a migration for their model change. Thus, we want our CI to run all migrations that exist in the codebase, compare them with the current state of the code first model and fail when the code first model state is not equal to the state that results from running all the migrations.
Is there a way to do this? I cannot find anything about this in the EF Core documentation.