Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SQLSTATE[42S02]: Base table or view not found: 1146 Table 'migration_db.taxonomy_index' doesn't exist: [error]
- SELECT 1 AS expression
- FROM
- {taxonomy_index} taxonomy_index
- WHERE ( (nid = :db_condition_placeholder_0) AND (tid = :db_condition_placeholder_1) AND (status =
- :db_condition_placeholder_2) ); Array
- (
- [:db_condition_placeholder_0] => 2290
- [:db_condition_placeholder_1] => 4
- [:db_condition_placeholder_2] => 1
- )
- (/home/vagrant/docroot/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php:770)
- ...
- process:
- field_section: Section
- ...
- class MyNodeMigration extends SqlBase {
- public function query() {
- return $this->select('TableA', 'ta')
- ->fields('ta', ['Id', 'Body', 'OriginalId']);
- }
- ...
- public function prepareRow(Row $row) {
- $row->setSourceProperty('Section', $this->convertToTermId($row->getSourceProperty('OriginalId'));
- }
- public function convertToTermId($original_id) {
- return $this->getDatabase()->select('TableB', 'tb')
- ->fields('tb', ['DrupalTermId'])
- ->condition('OldId', $original_id)
- ->execute()
- ->fetchField();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement