Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     /** Tables generation **/
     $this->createOrocrmSalesOpportunityTable($schema);
     $this->createOrocrmSalesLeadStatusTable($schema);
     $this->createOrocrmSalesFunnelTable($schema);
     $this->createOrocrmSalesOpportStatusTable($schema);
     $this->createOrocrmSalesOpportCloseRsnTable($schema);
     $this->createOrocrmSalesLeadTable($schema);
     $this->createOrocrmSalesB2bCustomerTable($schema);
     /** Tables update */
     $this->addOroEmailMailboxProcessorColumns($schema);
     /** Foreign keys generation **/
     $this->addOrocrmSalesOpportunityForeignKeys($schema);
     $this->addOrocrmSalesFunnelForeignKeys($schema);
     $this->addOrocrmSalesLeadForeignKeys($schema);
     $this->addOrocrmSalesB2bCustomerForeignKeys($schema);
     $this->addOroEmailMailboxProcessorForeignKeys($schema);
     /** Apply extensions */
     SalesNoteMigration::addNoteAssociations($schema, $this->noteExtension);
     $this->activityExtension->addActivityAssociation($schema, 'oro_email', 'orocrm_sales_lead');
     $this->activityExtension->addActivityAssociation($schema, 'oro_email', 'orocrm_sales_opportunity');
     $this->activityExtension->addActivityAssociation($schema, 'oro_email', 'orocrm_sales_b2bcustomer');
     $this->activityExtension->addActivityAssociation($schema, 'orocrm_call', 'orocrm_sales_lead');
     $this->activityExtension->addActivityAssociation($schema, 'orocrm_call', 'orocrm_sales_opportunity');
     $this->activityExtension->addActivityAssociation($schema, 'orocrm_call', 'orocrm_sales_b2bcustomer');
     $this->activityExtension->addActivityAssociation($schema, 'orocrm_task', 'orocrm_sales_lead');
     $this->activityExtension->addActivityAssociation($schema, 'orocrm_task', 'orocrm_sales_opportunity');
     $this->activityExtension->addActivityAssociation($schema, 'orocrm_task', 'orocrm_sales_b2bcustomer');
     $this->activityExtension->addActivityAssociation($schema, 'oro_calendar_event', 'orocrm_sales_lead');
     $this->activityExtension->addActivityAssociation($schema, 'oro_calendar_event', 'orocrm_sales_opportunity');
     $this->activityExtension->addActivityAssociation($schema, 'oro_calendar_event', 'orocrm_sales_b2bcustomer');
     OpportunityAttachment::addOpportunityAttachment($schema, $this->attachmentExtension);
     InheritanceActivityTargets::addInheritanceTargets($schema, $this->activityListExtension);
     SalesOrganizations::addOrganization($schema);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     /** Tables generation **/
     $this->createOrocrmSalesOpportunityTable($schema);
     $this->createOrocrmSalesLeadStatusTable($schema);
     $this->createOrocrmSalesFunnelTable($schema);
     $this->createOrocrmSalesOpportStatusTable($schema);
     $this->createOrocrmSalesOpportCloseRsnTable($schema);
     $this->createOrocrmSalesLeadTable($schema);
     $this->createOrocrmSalesB2bCustomerTable($schema);
     /** Foreign keys generation **/
     $this->addOrocrmSalesOpportunityForeignKeys($schema);
     $this->addOrocrmSalesFunnelForeignKeys($schema);
     $this->addOrocrmSalesLeadForeignKeys($schema);
     $this->addOrocrmSalesB2bCustomerForeignKeys($schema);
     /** Apply extensions */
     SalesNoteMigration::addNoteAssociations($schema, $this->noteExtension);
     SalesActivityMigration::addActivityAssociations($schema, $this->activityExtension);
     OpportunityAttachment::addOpportunityAttachment($schema, $this->attachmentExtension);
     SalesOrganizations::addOrganization($schema);
 }