/// <summary> /// Generates a SQL script to migrate between two migrations. /// </summary> /// <param name="sourceMigration"> The migration to update from. If null is supplied, a script to update the current database will be produced. </param> /// <param name="targetMigration"> The migration to update to. If null is supplied, a script to update to the latest migration will be produced. </param> /// <param name="force"> Value indicating if data loss during automatic migration is acceptable. </param> /// <returns> The generated SQL script. </returns> public string ScriptUpdate(string sourceMigration, string targetMigration, bool force) { var runner = new ScriptUpdateRunner { SourceMigration = sourceMigration, TargetMigration = targetMigration, Force = force }; ConfigureRunner(runner); Run(runner); return((string)_appDomain.GetData("result")); }
/// <summary> /// Generates a SQL script to migrate between two migrations. /// </summary> /// <param name="sourceMigration"> The migration to update from. If null is supplied, a script to update the current database will be produced. </param> /// <param name="targetMigration"> The migration to update to. If null is supplied, a script to update to the latest migration will be produced. </param> /// <param name="force"> Value indicating if data loss during automatic migration is acceptable. </param> /// <returns> The generated SQL script. </returns> public string ScriptUpdate(string sourceMigration, string targetMigration, bool force) { var runner = new ScriptUpdateRunner { SourceMigration = sourceMigration, TargetMigration = targetMigration, Force = force }; ConfigureRunner(runner); Run(runner); return (string)_appDomain.GetData("result"); }