public object execute(CommandContext commandContext) { PersistenceSession persistenceSession = commandContext.getSession(typeof(PersistenceSession)); persistenceSession.dbSchemaDrop(); persistenceSession.dbSchemaCreate(); HistoryLevelSetupCommand.dbCreateHistoryLevel(commandContext); return(null); }
public object execute(CommandContext commandContext) { DbEntityManager dbEntityManager = commandContext.DbEntityManager; PropertyEntity historyLevelProperty = dbEntityManager.selectById(typeof(PropertyEntity), "historyLevel"); if (historyLevelProperty != null) { if (processEngineConfiguration.HistoryLevel.Id != new int?(historyLevelProperty.Value)) { historyLevelProperty.Value = Convert.ToString(processEngineConfiguration.HistoryLevel.Id); dbEntityManager.merge(historyLevelProperty); } } else { HistoryLevelSetupCommand.dbCreateHistoryLevel(commandContext); } return(null); }