Exemplo n.º 1
0
        private void DumpSubFolder(AlterPlan plan, string subfolder, int order)
        {
            string dir = GetPrivateSubFolder(subfolder);

            if (!Directory.Exists(dir))
            {
                return;
            }
            string[] files = Directory.GetFiles(dir);
            Array.Sort(files);
            foreach (string f in files)
            {
                if (!f.ToLower().EndsWith(".sql"))
                {
                    continue;
                }
                using (StreamReader sr = new StreamReader(f))
                {
                    foreach (string sql in QueryTools.GoSplit(sr))
                    {
                        plan.CustomAction(sql, order);
                    }
                }
            }
        }