It would be useful to have the ability to change the name of a migrations configuration file when migrations are enabled in a project with multiple DbContext classes and different associated migrations configurations. In this scenario, whenever the user tries to run either the "Add-Migration" or the "Update Database" command from the package manager, they are prompted to enter the Configuration type name. By default the name for all of these configuration files is "Configuration" and the user must specify the fully qualified name which is long, tedious, and error prone, but if the name of the configurations class is changed to something unique, than only that name must be specified.
Example:
PM> Enable-Migrations -ContextTypeName contextA -ConfigurationTypeName ConfigurationA -MigrationsDirectory migrationsA
PM> Enable-Migrations -ContextTypeName contextB -ConfigurationTypeName ConfigurationB -MigrationsDirectory migrationsB
PM> Add-Migration initialCreate
More than one migrations configuration type was found in the assembly 'ExampleProject'. Specify the name of the one to use.
PM> Add-Migration initialCreate -ConfigurationTypeName ConfigurationA
PM> Update-Database -ConfigurationTypeName ConfigurationA
Example:
PM> Enable-Migrations -ContextTypeName contextA -ConfigurationTypeName ConfigurationA -MigrationsDirectory migrationsA
PM> Enable-Migrations -ContextTypeName contextB -ConfigurationTypeName ConfigurationB -MigrationsDirectory migrationsB
PM> Add-Migration initialCreate
More than one migrations configuration type was found in the assembly 'ExampleProject'. Specify the name of the one to use.
PM> Add-Migration initialCreate -ConfigurationTypeName ConfigurationA
PM> Update-Database -ConfigurationTypeName ConfigurationA