code: private function isTableReferenced(Table $table)
      {
          $tableName = $table->getName();
          foreach ($this->getSchema()->getTables() as $tableIter) {
              foreach ($tableIter->getForeignKeys() as $fk) {
                  if ($fk->getForeignTableName() === $tableName) {
                      return true;
                  }
              }
          }
  
          return false;
      }
docs: Returns true if the table $table is referenced by another table.
  
  @param Table $table
  
  @return bool