Ejemplo n.º 1
0
        private void ScriptBase(List <Urn> objects)
        {
            _server.Scripter.Options = CreateOptions();
            var fileName = DirectoryManager.GetFileCreateDatabase();

            _server.Scripter.Options.FileName     = fileName;
            _server.Scripter.Options.AppendToFile = false;
            _server.Scripter.Script(objects.ToArray());
            var processor = new PostScriptProcessor(fileName);

            processor.Execute();
        }
Ejemplo n.º 2
0
 public void LoadSchema()
 {
     Console.WriteLine("Loading schema");
     using (var manager = new TransactionManager(_migrationsServer))
     {
         Console.WriteLine("Creating base");
         RunScript(DirectoryManager.GetFileCreateDatabase());
         Console.WriteLine("Creating methods");
         RunScript(DirectoryManager.GetFileCreateMethods());
         Console.WriteLine("Populating schema changes");
         RunScript(DirectoryManager.GetFileSchemaChanges());
         manager.CommitTransaction();
     }
 }