@@ 1106-1127 (lines=22) @@ | ||
1103 | * |
|
1104 | * @param Schema $schema |
|
1105 | */ |
|
1106 | protected function addOrocrmMagentoCartItemForeignKeys(Schema $schema) |
|
1107 | { |
|
1108 | $table = $schema->getTable('orocrm_magento_cart_item'); |
|
1109 | $table->addForeignKeyConstraint( |
|
1110 | $schema->getTable('orocrm_magento_cart'), |
|
1111 | ['cart_id'], |
|
1112 | ['id'], |
|
1113 | ['onDelete' => 'CASCADE'] |
|
1114 | ); |
|
1115 | $table->addForeignKeyConstraint( |
|
1116 | $schema->getTable('oro_integration_channel'), |
|
1117 | ['channel_id'], |
|
1118 | ['id'], |
|
1119 | ['onDelete' => 'SET NULL'] |
|
1120 | ); |
|
1121 | $table->addForeignKeyConstraint( |
|
1122 | $schema->getTable('oro_organization'), |
|
1123 | ['owner_id'], |
|
1124 | ['id'], |
|
1125 | ['onDelete' => 'SET NULL'] |
|
1126 | ); |
|
1127 | } |
|
1128 | ||
1129 | /** |
|
1130 | * Add orocrm_magento_customer_addr foreign keys. |
|
@@ 1464-1485 (lines=22) @@ | ||
1461 | * |
|
1462 | * @param Schema $schema |
|
1463 | */ |
|
1464 | protected function addOrocrmMagentoOrderItemsForeignKeys(Schema $schema) |
|
1465 | { |
|
1466 | $table = $schema->getTable('orocrm_magento_order_items'); |
|
1467 | $table->addForeignKeyConstraint( |
|
1468 | $schema->getTable('orocrm_magento_order'), |
|
1469 | ['order_id'], |
|
1470 | ['id'], |
|
1471 | ['onDelete' => 'CASCADE'] |
|
1472 | ); |
|
1473 | $table->addForeignKeyConstraint( |
|
1474 | $schema->getTable('oro_integration_channel'), |
|
1475 | ['channel_id'], |
|
1476 | ['id'], |
|
1477 | ['onDelete' => 'SET NULL'] |
|
1478 | ); |
|
1479 | $table->addForeignKeyConstraint( |
|
1480 | $schema->getTable('oro_organization'), |
|
1481 | ['owner_id'], |
|
1482 | ['id'], |
|
1483 | ['onDelete' => 'SET NULL'] |
|
1484 | ); |
|
1485 | } |
|
1486 | ||
1487 | /** |
|
1488 | * Add orocrm_magento_newsl_subscr foreign keys. |