ALTER TABLE `symfony`.`exp_document`
ADD FOREIGN KEY (`yii`)
REFERENCES `yii`.`eor2_document`(`id`)
ON DELETE RESTRICT ON UPDATE RESTRICT;
SELECT
symfony_doc.name as s_name,
yii_doc.id as y_id,
yii_doc.doc_name as y_name
FROM `exp_document` as symfony_doc
LEFT JOIN `yii`.`eor2_document` AS yii_doc ON symfony_doc.`yii` = yii_doc.id