Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     /** Tables generation **/
     $this->createOrocrmMagentoRegionTable($schema);
     $this->createOrocrmMagentoCartAddressTable($schema);
     $this->createOrocrmMagentoOrderTable($schema);
     $this->createOrocrmMagentoOrderCallsTable($schema);
     $this->createOrocrmMagentoOrderEmailsTable($schema);
     $this->createOrocrmMagentoCustomerGroupTable($schema);
     $this->createOrocrmMagentoCustomerTable($schema);
     $this->createOrocrmMagentoCartItemTable($schema);
     $this->createOrocrmMagentoCustomerAddrTable($schema);
     $this->createOrocrmMagentoCustAddrTypeTable($schema);
     $this->createOrocrmMagentoOrderAddressTable($schema);
     $this->createOrocrmMagentoOrderAddrTypeTable($schema);
     $this->createOrocrmMagentoProductTable($schema);
     $this->createOrocrmMagentoProdToWebsiteTable($schema);
     $this->createOrocrmMagentoWebsiteTable($schema);
     $this->createOrocrmMagentoCartTable($schema);
     $this->createOrocrmMagentoCartCallsTable($schema);
     $this->createOrocrmMagentoCartEmailsTable($schema);
     $this->createOrocrmMagentoStoreTable($schema);
     $this->createOrocrmMagentoCartStatusTable($schema);
     $this->createOrocrmMagentoOrderItemsTable($schema);
     $this->updateIntegrationTransportTable($schema);
     /** Foreign keys generation **/
     $this->addOrocrmMagentoCartAddressForeignKeys($schema);
     $this->addOrocrmMagentoOrderForeignKeys($schema);
     $this->addOrocrmMagentoOrderCallsForeignKeys($schema);
     $this->addOrocrmMagentoOrderEmailsForeignKeys($schema);
     $this->addOrocrmMagentoCustomerGroupForeignKeys($schema);
     $this->addOrocrmMagentoCustomerForeignKeys($schema);
     $this->addOrocrmMagentoCartItemForeignKeys($schema);
     $this->addOrocrmMagentoCustomerAddrForeignKeys($schema);
     $this->addOrocrmMagentoCustAddrTypeForeignKeys($schema);
     $this->addOrocrmMagentoOrderAddressForeignKeys($schema);
     $this->addOrocrmMagentoOrderAddrTypeForeignKeys($schema);
     $this->addOrocrmMagentoProductForeignKeys($schema);
     $this->addOrocrmMagentoProdToWebsiteForeignKeys($schema);
     $this->addOrocrmMagentoWebsiteForeignKeys($schema);
     $this->addOrocrmMagentoCartForeignKeys($schema);
     $this->addOrocrmMagentoCartCallsForeignKeys($schema);
     $this->addOrocrmMagentoCartEmailsForeignKeys($schema);
     $this->addOrocrmMagentoStoreForeignKeys($schema);
     $this->addOrocrmMagentoOrderItemsForeignKeys($schema);
     /** Enable activities */
     MagentoActivities::addActivityAssociations($schema, $this->activityExtension);
     MagentoActivities::disableActivityAssociations($schema);
 }
 /**
  * Enable activities
  *
  * @param Schema $schema
  */
 protected function addActivityAssociations(Schema $schema)
 {
     $this->activityExtension->addActivityAssociation($schema, 'oro_email', 'orocrm_magento_customer');
     $this->activityExtension->addActivityAssociation($schema, 'orocrm_call', 'orocrm_magento_customer');
     $this->activityExtension->addActivityAssociation($schema, 'orocrm_task', 'orocrm_magento_customer');
     $this->activityExtension->addActivityAssociation($schema, 'oro_calendar_event', 'orocrm_magento_customer');
     MagentoActivities::disableActivityAssociations($schema);
 }