code: private void addEntity(DbEntity entity, boolean recovering) throws DatabaseEngineException {
          if (!recovering) {
              try {
                  getConnection();
              } catch (final Exception e) {
                  throw new DatabaseEngineException("Could not add entity", e);
              }
  
              validateEntity(entity);
  
              if (entities.containsKey(entity.getName())) {
                  throw new DatabaseEngineException(String.format("Entity '%s' is already defined", entity.getName()));
              }
  
              if (this.properties.isSchemaPolicyDropCreate()) {
                  dropEntity(entity);
              }
          }
  
          if (!this.properties.isSchemaPolicyNone()) {
              createTable(entity);
              addPrimaryKey(entity);
              addFks(entity);
              addIndexes(entity);
              addSequences(entity);
          }
  
          loadEntity(entity);
      }
docs: Adds an entity to the engine. It will create tables and everything necessary so persistence can work.
  
  @param entity     The entity to add.
  @param recovering True if entities are being add due to recovery.
  @throws DatabaseEngineException If something goes wrong while creating the structures.