protected override string GetReplacementScript(string script)
        {
            var parser = new TSql120Parser(true);
            IList <ParseError> errors;
            var fragment = parser.Parse(new StringReader(script), out errors);
            var visitor  = new IndexVisitior();

            fragment.Accept(visitor);
            var newScript = script;

            foreach (var create in visitor.Creates)
            {
                var    newCreate = GenerateCreateWithEditionCheck(create);
                var    generator = new Sql120ScriptGenerator();
                string newStatement;
                generator.GenerateScript(newCreate, out newStatement);

                newScript = newScript.Replace(
                    script.Substring(fragment.StartOffset, fragment.FragmentLength), newStatement);
            }

            return(newScript);
        }
        protected override string GetReplacementScript(string script)
        {
            var parser = new TSql120Parser(true);
            IList<ParseError> errors;
            var fragment = parser.Parse(new StringReader(script), out errors);
            var visitor = new IndexVisitior();

            fragment.Accept(visitor);
            var newScript = script;

            foreach (var create in visitor.Creates)
            {
                var newCreate = GenerateCreateWithEditionCheck(create);
                var generator = new Sql120ScriptGenerator();
                string newStatement;
                generator.GenerateScript(newCreate, out newStatement);

                newScript = newScript.Replace(
                    script.Substring(fragment.StartOffset, fragment.FragmentLength), newStatement);
            }

            return newScript;
        }