protected function syncRelatedFields(
        IdProperty $newProp,
        PropertyField $newField,
        IdProperty $oldProp,
        PropertyField $oldField
    ) {
        unset($newProp, $oldProp, $oldField);

        $cli = $this->climate();
        if (!$this->quiet()) {
            $cli->br();
            $cli->comment('Syncing new IDs to related tables.');
        }

        $related = $cli->arguments->get('related_model');
        if (!$related) {
            $cli->br();
            $input = $cli->confirm('Are there any model(s) related to the target?');
            if (!$input->confirmed()) {
                return $this;
            }

            $related = $this->argOrInput('related_model');
        }
        $this->setRelatedModels($related);

        $target = $this->targetModel();
        $table  = $target->source()->table();
        foreach ($this->relatedModels() as $model) {
            $src = $model->source();
            $tbl = $src->table();
            $dbh = $src->db();

            $dbh->query(
                strtr(
                    'LOCK TABLES
                        `%relatedTable` AS a WRITE,
                        `%sourceTable` AS b WRITE',
                    [
                        '%relatedTable' => $tbl,
                        '%sourceTable'  => $table,
                    ]
                )
            );

            $sql = strtr(
                'UPDATE `%relatedTable` AS a '.
                    'JOIN `%sourceTable` AS b ON a.`%prop` = b.`%oldKey` '.
                    'SET a.`%prop` = b.`%newKey`',
                [
                    '%relatedTable' => $tbl,
                    '%prop'         => $this->relatedProperties[$model->objType()],
                    '%sourceTable'  => $table,
                    '%newKey'       => $newField->ident(),
                    '%oldKey'       => $target->key(),
                ]
            );
            $dbh->query($sql);

            $dbh->query('UNLOCK TABLES');
        }

        return $this;
    }