public void OutputScript(object migrator, string targetMigration, string outputPath, out IMessage message)
        {
            var scriptor = _entityFrameworkHelper.GetMigratorScriptingDecoratorInstance(migrator, out message);

            if (message != null)
            {
                return;
            }

            var scriptorType = scriptor.GetType();
            var scriptParams = new object[2];

            scriptParams[0] = null;
            if (string.IsNullOrEmpty(targetMigration))
            {
                scriptParams[1] = null;
            }
            else
            {
                scriptParams[1] = targetMigration;
            }

            var sqlScript = scriptorType.GetMethod("ScriptUpdate").Invoke(scriptor, scriptParams) as string;

            if (!string.IsNullOrEmpty(outputPath))
            {
                if (File.Exists(outputPath))
                {
                    File.Delete(outputPath);
                }

                File.WriteAllLines(outputPath, new[] { sqlScript });
                Console.WriteLine("Script output to: {0}", outputPath);
                return;
            }

            Console.WriteLine(sqlScript);
        }