code: def _add_orfs(self, which, symbol, ind, val, dt_log=None, user=None, comment=None):
          
          if not isinstance(symbol, (str, unicode)):
              symbol = symbol.name
  
          if not dt_log:
              dt_log = dt.datetime.now()
  
          if which.lower() == 'override':
              qry = self.ses.query(func.max(Override.ornum).label('max_ornum'))
              override = True
          elif which.lower() == 'failsafe':
              qry = self.ses.query(func.max(FailSafe.fsnum).label('max_fsnum'))
              override = False
              
          qry = qry.filter_by(symname = symbol)
          
          cur_num = qry.one()
          
          if cur_num[0] is None:
              next_num = 0
          else:
              next_num = cur_num[0] + 1            
  
          if override:
              tmp = Override(symname=symbol,
                             ind=ind,
                             val=val,
                             dt_log=dt_log,
                             user=user,
                             comment=comment,
                             ornum=next_num)
          else:
              tmp = FailSafe(symname=symbol,
                             ind=ind,
                             val=val,
                             dt_log=dt_log,
                             user=user,
                             comment=comment,
                             fsnum=next_num)
                                               
          self.ses.add(tmp)
          self.ses.commit()
docs: Appends a single indexed-value pair, to a symbol object, to be
          used during the final steps of the aggregation of the datatable.
  
          See add_override and add_fail_safe.
          
          Parameters
          ----------
          which : str
              Fail Safe or Override?
          symbol : Symbol or str
              The Symbol to apply the fail safe
          ind : obj
              The index value where the fail safe should be applied
          val : obj
              The data value which will be used in the fail safe
          dt_log : datetime
              A log entry, for saving when this fail safe was created.
          user : str
              A string representing which user made the fail safe
          comment : str
              A string to store any notes related to this fail safe.