Neue Kommentare von Drupal 6 nach Drupal 8 kopieren

Es gibt eine Community-Webseite, basiert auf Drupal 6, welche erste Phase von Upgrade/Migration hinter sich hat. Täglich kommen hunderte neue Kommentare dazu. Migration jedes mal neu starten geht nicht. Alle neue Kommentare manuell umziehen ist sehr zeitaufwendig. Deswegen haben wir folgendes ausprobiert, was scheinbar funktioniert:

 

  1. Hunderte neue leere Kommentare auf D8 erstellen. das kann man auch mit F5 / Browser-Reload.

     
  2. DB-Tabelle db-drupal8.comment_field_data und db-drupal6.comments abgleichen

     
  3. DB-Tabelle db-drupal8.comment__comment_body und db-drupal6.comments abgleichen

     
  4. Wenn nötig comment_body_format anpassen



Mögliche SQL Code (keine Haftung):

update drupal8.comment_field_data d8, drupal6.comments d6 set

d8.status=d6.status,

d8.pid=d6.pid,

d8.entity_id=d6.nid,

d8.subject=d6.subject,

d8.uid=d6.uid,

d8.name=d6.name,

d8.mail=d6.mail,

d8.homepage=d6.homepage,

d8.hostname=d6.hostname,

d8.created=d6.timestamp,

d8.changed=d6.timestamp,

d8.thread=d6.thread

where d8.cid = d6.cid and d8.cid > 12345;

 

 

 

update drupal8.comment__comment_body d8, drupal6.comments d6 set

d8.comment_body_value=d6.comment

where d8.entity_id = d6.cid and d8.entity_id > 12345;

 

 

"cid > 12345" muss man natürlich auch anpassen oder entfernen.

 

 

Neuen Kommentar schreiben

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

Suche

Neueste Kommentare

  • 5 days ago
    Warning: Undefined array key "url" in Drupal\Core\Asset\CssCollectionOptimizerLazy->optimizeGroup()
    Warning: Undefined array key "url" in Drupal\Core\Asset\JsCollectionOptimizerLazy->optimizeGroup() 
  • 1 week ago
    Server install & config : Debian 12 + Plesk + Apache + nginx + MariaDB + Solr
    sudo timedatectl set-timezone Europe/Berlin
  • 1 week 6 days ago
    Warning: PHP Startup: Unable to load dynamic library 'apcu.so' ... cannot open shared object file: No such file or directory

    Try this:

  • 3 weeks 5 days ago
    List Cronjobs for all users (via for + crontab)

    Alternative (without warnings like "no crontab for dovecot") to see all tasks:

  • 3 weeks 3 days ago
    Install APCu (PHP 8.1, Plesk)

    php 8.3 apcu failed

    über Plesk hat es geklappt.

     

  • 3 weeks 3 days ago
    Install APCu (PHP 8.1, Plesk)

     

    install:

    # sudo apt install php-dev
    
  • 3 weeks 3 days ago
    pecl install apcu : phpize: not found / ERROR: `phpize' failed

    phpize

    # sudo apt install php-dev
    

     

    details

  • 3 weeks 3 days ago
    Install APCu (PHP 8.1, Plesk)

    Problem:

  • 2 months 1 week ago
    Install APCu (PHP 8.1, Plesk)

    Problem:

  • 3 months 2 weeks ago
    Linux mv: das Verschieben von 'new' nach 'old' ist nicht möglich: Das Verzeichnis ist nicht leer

    Hilft "cp -avf old new && rm -rvf old" nicht?