Does anyone know how to change the output directory of the following command?
dotnet ef migrations add Initial --context EsportshubApi.Models.ApplicationDbContext
I tried to add the option:
--content-root-path 'Migrations/Identity'
But that doesn't do anything. There is a --data-dir
option as well and something else with directory. But none of them is the output for migrations.
My problem is that I have 2 DbContexts so I want their migrations to be separated.
dotnet ef migrations add Initial --context EsportshubApi.Models.ApplicationDbContext -o YourFolderPath
dotnet ef migrations add
Adds a new migration.
Arguments:
< NAME > The name of the migration.
Options:
-o --output-dir < PATH > The directory (and sub-namespace) to use. Paths are relative to the project directory. Defaults to "Migrations".