3 namespace Drupal\node\Plugin\migrate\source\d6;
4 use Drupal\Core\Database\Query\SelectInterface;
7 * Drupal 6 node revision source from database.
10 * id = "d6_node_revision"
13 class NodeRevision extends Node {
16 * The join options between the node and the node_revisions_table.
18 const JOIN = 'n.nid = nr.nid AND n.vid <> nr.vid';
23 public function fields() {
24 // Use all the node fields plus the vid that identifies the version.
25 return parent::fields() + [
26 'vid' => t('The primary identifier for this version.'),
27 'log' => $this->t('Revision Log message'),
28 'timestamp' => $this->t('Revision timestamp'),
35 public function getIds() {
36 $ids['vid']['type'] = 'integer';
37 $ids['vid']['alias'] = 'nr';
44 protected function handleTranslations(SelectInterface $query) {
45 // @todo in https://www.drupal.org/node/2746541