Exemplo n.º 1
0
        public void Modify(SqlProject project)
        {
            var dbName = project.GetDatabaseName();

            if (dbName == null)
            {
                throw new Exception("DbName is not defined");
            }

            var sqlScript = SqlCommands.GetDeleteDb(dbName);

            foreach (var sqlBatch in sqlScript.Batches.Reverse())
            {
                project.Database.Batches.Insert(0, sqlBatch);
            }
        }
Exemplo n.º 2
0
 public void Modify(SqlProject project)
 {
     project.Database.Batches.Add(new TSqlBatch
     {
         Statements =
         {
             new AlterDatabaseSetStatement
             {
                 DatabaseName = project.GetDatabaseName(),
                 Options      =
                 {
                     new RecoveryDatabaseOption
                     {
                         Value = RecoveryDatabaseOptionKind.Simple
                     }
                 }
             }
         }
     });
 }