in src/rider/main/kotlin/com/jetbrains/rider/plugins/efcore/cli/api/MigrationsCommandFactory.kt [39:54]
fun generateScript(efCoreVersion: DotnetEfVersion, options: DialogCommonOptions, fromMigration: String, toMigration: String?,
outputFile: String, idempotent: Boolean, noTransactions: Boolean): CliCommand {
val presentation = CliCommandPresentationInfo(
EfCoreUiBundle.message("generate.sql.script.presentable.name"),
EfCoreUiBundle.message("script.has.been.generated"))
return EfCoreCliCommandBuilder(intellijProject, KnownEfCommands.Migrations.script, options, presentation).apply {
add(fromMigration)
addNullable(toMigration)
addNamed("--output", outputFile)
addIf("--idempotent", idempotent)
if (efCoreVersion.major >= 5) {
addIf("--no-transactions", noTransactions)
}
}.build()
}