Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. SQLSTATE[42S02]: Base table or view not found: 1146 Table 'migration_db.taxonomy_index' doesn't exist: [error]
  2. SELECT 1 AS expression
  3. FROM
  4. {taxonomy_index} taxonomy_index
  5. WHERE ( (nid = :db_condition_placeholder_0) AND (tid = :db_condition_placeholder_1) AND (status =
  6. :db_condition_placeholder_2) ); Array
  7. (
  8. [:db_condition_placeholder_0] => 2290
  9. [:db_condition_placeholder_1] => 4
  10. [:db_condition_placeholder_2] => 1
  11. )
  12. (/home/vagrant/docroot/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:770)
  13.  
  14. ...
  15. process:
  16. field_section: Section
  17. ...
  18.  
  19. class MyNodeMigration extends SqlBase {
  20. public function query() {
  21. return $this->select('TableA', 'ta')
  22. ->fields('ta', ['Id', 'Body', 'OriginalId']);
  23. }
  24. ...
  25. public function prepareRow(Row $row) {
  26. $row->setSourceProperty('Section', $this->convertToTermId($row->getSourceProperty('OriginalId'));
  27. }
  28.  
  29. public function convertToTermId($original_id) {
  30. return $this->getDatabase()->select('TableB', 'tb')
  31. ->fields('tb', ['DrupalTermId'])
  32. ->condition('OldId', $original_id)
  33. ->execute()
  34. ->fetchField();
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement