public override void ExecuteWith(IMigrationProcessor processor) { string sqlText; var embeddedResourceNameWithAssembly = GetQualifiedResourcePath(); using (var stream = embeddedResourceNameWithAssembly .Assembly.GetManifestResourceStream(embeddedResourceNameWithAssembly.Name)) using (var reader = new StreamReader(stream)) { sqlText = reader.ReadToEnd(); } sqlText = SqlScriptTokenReplacer.ReplaceSqlScriptTokens(sqlText, Parameters); processor.Execute(sqlText); }
/// <summary> /// Executes the <paramref name="sqlScript"/> with the given <paramref name="processor"/> /// </summary> /// <param name="processor">The processor to execute the script with</param> /// <param name="sqlScript">The SQL script to execute</param> protected void Execute(IMigrationProcessor processor, string sqlScript) { var finalSqlScript = SqlScriptTokenReplacer.ReplaceSqlScriptTokens(sqlScript, Parameters); processor.Execute(finalSqlScript); }