code: async function validateDeleted (args) {
      try {
          var deletedTable = await this.mysql().query(
              sql.showCreateTable({name: `${this.name}Delete`}), {}, {}, args.session
          )
      }
      // exception will be thrown if table does not exist
      catch (err) {
          return
      }
      // get deleted records
      const [ results ] = await this.mysql().query(sql.selectDeleted(this))
      debug(`checking ${results.length} deleted records`)
      // check each record and delete if needed
      for (const result of results) {
          // load current record
          var record = await this.query({
              allow: true,
              cache: false,
              current: true,
              one: true,
              session: args.session,
              where: { id: result.id }
          })
          // skip if record not found
          if (!defined(record)) {
              continue
          }
          // skip if id does not match
          if (record.id !== result.id) {
              continue
          }
          // skip if record already deleted
          if (record.isDeleted) {
              continue
          }
          debug(`deleting ${record.id}`)
          // delete record
          await record.delete({allow: true, cache: false})
      }
  }
docs: @function validateDeleted
  
  if delete/unDelete tables exist set correct value for d column
  
  @param {object} args
  
  @returns {Promise}