/** * @param int $storeId * @param int $metaId * @return void */ protected function addDataProfileTable($storeId, $metaId) { $incrementPrefix = $this->getIncrementPrefix($storeId); $data = ['meta_id' => $metaId, 'prefix' => $incrementPrefix ?: '']; $data = array_merge($this->defaultValuesProfile, $data); $this->destination->saveRecords($this->helper->getSequenceProfileTable(), [$data]); }
/** * {@inheritdoc} */ public function perform() { $this->progress->start(1); $this->progress->advance(); if (!$this->destination->getDocument($this->helper->getSequenceProfileTable())) { $this->missingDocuments[MapInterface::TYPE_DEST][$this->helper->getSequenceProfileTable()] = true; } else { $structureExistingSequenceProfileTable = array_keys($this->destination->getDocument($this->helper->getSequenceProfileTable())->getStructure()->getFields()); $this->checkStructure($this->helper->getSequenceProfileTable(), $this->helper->getSequenceProfileTable(true), $structureExistingSequenceProfileTable); } if (!$this->destination->getDocument($this->helper->getSequenceMetaTable())) { $this->missingDocuments[MapInterface::TYPE_DEST][$this->helper->getSequenceMetaTable()] = true; } else { $structureExistingSequenceMetaTable = array_keys($this->destination->getDocument($this->helper->getSequenceMetaTable())->getStructure()->getFields()); $this->checkStructure($this->helper->getSequenceMetaTable(), $this->helper->getSequenceMetaTable(true), $structureExistingSequenceMetaTable); } $this->progress->finish(); return $this->checkForErrors(); }