code: function(callback) {
                  if (db && !cacheDeletingInProgress) {
                      cacheDeletingInProgress = true;
                      db.threads
                          .where('owner')
                          .equals(userInfo.id)
                          .delete()
                          .then(function() {
                              console.log('threads table deleted');
  
                              db.contacts
                                  .where('owner')
                                  .equals(userInfo.id)
                                  .delete()
                                  .then(function() {
                                      console.log('contacts table deleted');
  
                                      db.messages
                                          .where('owner')
                                          .equals(userInfo.id)
                                          .delete()
                                          .then(function() {
                                              console.log('messages table deleted');
  
                                              db.participants
                                                  .where('owner')
                                                  .equals(userInfo.id)
                                                  .delete()
                                                  .then(function() {
                                                      console.log('participants table deleted');
  
                                                      db.messageGaps
                                                          .where('owner')
                                                          .equals(userInfo.id)
                                                          .delete()
                                                          .then(function() {
                                                              console.log('messageGaps table deleted');
                                                              cacheDeletingInProgress = false;
                                                              callback && callback();
                                                          });
                                                  });
                                          });
                                  });
                          })
                          .catch(function(error) {
                              fireEvent('error', {
                                  code: error.code,
                                  message: error.message,
                                  error: error
                              });
                          });
                  }
              }
docs: *****************************************************
  P R I V A T E   M E T H O D S            *
  *****************************************************