‎15-03-2018 12:15 PM
Hi,
I was trying to delete the Mega History using the below code but it didn't work for me. Is there any other way?
Code sample:-
------------------------
if(applicaiton==null){
applicaiton = new MegaApplication();
}
ennvs = applicaiton.getEnvironments();
if(ennvs==null){
throw new IllegalStateException("Cannot list environments.");
}
environment = ennvs.get(environmentName);
if(environment==null){
throw new IllegalArgumentException("Cannot find the environment: "+environmentName);
}
environment.setCurrentAdministrator(userName);
environment.setCurrentPassword(password);
MegaDatabases databases = environment.databases();
database = databases.get(databaseName);
database.historyReset(new SimpleDateFormat("dd-MMM-yyyy").parse("7-Jun-2017"), "NoCheck")
// MegaDatabase.Log log = database.log();
// log.reset();