/**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     $this->attachmentExtension->addFileRelation($schema, 'orocrm_partner', 'contract', 'file', [], 7);
     $this->attachmentExtension->addAttachmentAssociation($schema, 'orocrm_partner', ['image/*', 'application/pdf', 'application/zip', 'application/x-gzip', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'], 2);
     $this->noteExtension->addNoteAssociation($schema, 'orocrm_partner');
     $this->activityExtension->addActivityAssociation($schema, 'oro_email', 'orocrm_partner');
 }
Example #2
0
 /**
  * Enable notes for Case entity
  *
  * @param Schema        $schema
  * @param NoteExtension $noteExtension
  */
 public static function addNoteAssociations(Schema $schema, NoteExtension $noteExtension)
 {
     $table = $schema->getTable('oro_note');
     if (!$table->hasColumn($noteExtension->getAssociationColumnName('orocrm_case'))) {
         $noteExtension->addNoteAssociation($schema, 'orocrm_case');
     }
 }
 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     $this->attachmentExtension->addFileRelation($schema, 'orocrm_partner', 'contract', [], 7);
     $this->attachmentExtension->addAttachmentAssociation($schema, 'orocrm_partner', ['image/*', 'application/pdf', 'application/zip', 'application/x-gzip', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'], 2);
     $this->noteExtension->addNoteAssociation($schema, 'orocrm_partner');
     $this->activityExtension->addActivityAssociation($schema, 'oro_email', 'orocrm_partner');
     $this->activityExtension->addActivityAssociation($schema, 'orocrm_partner_github_issue', 'orocrm_partner');
     $this->extendExtension->addEnumField($schema, $schema->getTable('orocrm_partner_github_issue'), 'status', 'github_issue_status', false, false, ['extend' => ['owner' => ExtendScope::OWNER_CUSTOM]]);
 }
 /**
  * @param Schema $schema
  */
 protected function createOrob2BPriceListTable(Schema $schema)
 {
     $table = $schema->createTable('orob2b_price_list');
     $table->addColumn('id', 'integer', ['autoincrement' => true]);
     $table->addColumn('name', 'string', ['length' => 255]);
     $table->addColumn('is_default', 'boolean', []);
     $table->addColumn('created_at', 'datetime', ['comment' => '(DC2Type:datetime)']);
     $table->addColumn('updated_at', 'datetime', ['comment' => '(DC2Type:datetime)']);
     $table->setPrimaryKey(['id']);
     $this->noteExtension->addNoteAssociation($schema, 'orob2b_price_list');
 }
 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     /** Tables generation **/
     $this->createOrocrmAccountTable($schema);
     $this->createOrocrmAccountToContactTable($schema);
     /** Foreign keys generation **/
     $this->addOrocrmAccountForeignKeys($schema);
     $this->addOrocrmAccountToContactForeignKeys($schema);
     $this->noteExtension->addNoteAssociation($schema, 'orocrm_account');
     $this->activityExtension->addActivityAssociation($schema, 'oro_email', 'orocrm_account');
     $this->attachmentExtension->addAttachmentAssociation($schema, 'orocrm_account', ['image/*', 'application/pdf', 'application/zip', 'application/x-gzip', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'], 2);
 }
 /**
  * Create orob2b_catalog_category table
  *
  * @param Schema $schema
  */
 protected function createOroB2BCatalogCategoryTable(Schema $schema)
 {
     $table = $schema->createTable('orob2b_catalog_category');
     $table->addColumn('id', 'integer', ['autoincrement' => true]);
     $table->addColumn('parent_id', 'integer', ['notnull' => false]);
     $table->addColumn('tree_left', 'integer', []);
     $table->addColumn('tree_level', 'integer', []);
     $table->addColumn('tree_right', 'integer', []);
     $table->addColumn('tree_root', 'integer', ['notnull' => false]);
     $table->addColumn('created_at', 'datetime', ['comment' => '(DC2Type:datetime)']);
     $table->addColumn('updated_at', 'datetime', ['comment' => '(DC2Type:datetime)']);
     $table->setPrimaryKey(['id']);
     $this->noteExtension->addNoteAssociation($schema, 'orob2b_catalog_category');
 }
 /**
  * Create orob2b_order table
  *
  * @param Schema $schema
  */
 protected function createOroB2BOrderTable(Schema $schema)
 {
     $table = $schema->createTable('orob2b_order');
     $table->addColumn('id', 'integer', ['autoincrement' => true]);
     $table->addColumn('organization_id', 'integer', ['notnull' => false]);
     $table->addColumn('user_owner_id', 'integer', ['notnull' => false]);
     $table->addColumn('shipping_address_id', 'integer', ['notnull' => false]);
     $table->addColumn('billing_address_id', 'integer', ['notnull' => false]);
     $table->addColumn('price_list_id', 'integer', ['notnull' => false]);
     $table->addColumn('identifier', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('created_at', 'datetime', ['comment' => '(DC2Type:datetime)']);
     $table->addColumn('updated_at', 'datetime', ['comment' => '(DC2Type:datetime)']);
     $table->addColumn('po_number', 'string', ['notnull' => false, 'length' => 255]);
     $table->addColumn('customer_notes', 'text', ['notnull' => false]);
     $table->addColumn('ship_until', 'date', ['notnull' => false]);
     $table->addColumn('currency', 'string', ['notnull' => false, 'length' => 3]);
     $table->addColumn('subtotal', 'money', ['notnull' => false, 'precision' => 19, 'scale' => 4, 'comment' => '(DC2Type:money)']);
     $table->addColumn('payment_term_id', 'integer', ['notnull' => false]);
     $table->addColumn('account_id', 'integer', []);
     $table->addColumn('account_user_id', 'integer', ['notnull' => false]);
     $table->setPrimaryKey(['id']);
     $table->addIndex(['created_at'], 'orob2b_order_created_at_index', []);
     $table->addUniqueIndex(['identifier'], 'uniq_orob2b_order_identifier');
     $table->addUniqueIndex(['shipping_address_id'], 'uniq_c036ff904d4cff2b');
     $table->addUniqueIndex(['billing_address_id'], 'uniq_c036ff9079d0c0e4');
     $this->noteExtension->addNoteAssociation($schema, $table->getName());
     $this->attachmentExtension->addAttachmentAssociation($schema, $table->getName());
     $this->activityExtension->addActivityAssociation($schema, 'oro_calendar_event', $table->getName());
     $this->activityExtension->addActivityAssociation($schema, 'oro_email', $table->getName());
 }
 /**
  * {@inheritdoc}
  */
 public function up(Schema $schema, QueryBag $queries)
 {
     /** Tables generation **/
     $this->createOrocrmAccountTable($schema);
     $this->createOrocrmAccountToContactTable($schema);
     /** Foreign keys generation **/
     $this->addOrocrmAccountForeignKeys($schema);
     $this->addOrocrmAccountToContactForeignKeys($schema);
     $this->noteExtension->addNoteAssociation($schema, 'orocrm_account');
     $this->activityExtension->addActivityAssociation($schema, 'oro_email', 'orocrm_account');
     $this->activityExtension->addActivityAssociation($schema, 'oro_calendar_event', 'orocrm_account');
     $this->attachmentExtension->addAttachmentAssociation($schema, 'orocrm_account', ['image/*', 'application/pdf', 'application/zip', 'application/x-gzip', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation'], 2);
     InheritanceActivityTargets::addInheritanceTargets($schema, $this->activityListExtension);
     // update to 1.8
     $addReferredBy = new AddReferredBy();
     $addReferredBy->up($schema, $queries);
 }
 /**
  * Create orob2b_account_user_role table
  *
  * @param Schema $schema
  */
 protected function createOroB2BAccountUserRoleTable(Schema $schema)
 {
     $table = $schema->createTable(static::ORO_B2B_ACCOUNT_USER_ROLE_TABLE_NAME);
     $table->addColumn('id', 'integer', ['autoincrement' => true]);
     $table->addColumn('organization_id', 'integer', ['notnull' => false]);
     $table->addColumn('account_id', 'integer', ['notnull' => false]);
     $table->addColumn('role', 'string', ['length' => 64]);
     $table->addColumn('label', 'string', ['length' => 64]);
     $table->setPrimaryKey(['id']);
     $table->addUniqueIndex(['role']);
     $table->addUniqueIndex(['account_id', 'label'], 'orob2b_account_user_role_account_id_label_idx');
     $this->noteExtension->addNoteAssociation($schema, static::ORO_B2B_ACCOUNT_USER_ROLE_TABLE_NAME);
 }
 /**
  * Create orob2b_customer table
  *
  * @param Schema $schema
  */
 protected function createOroB2BCustomerTable(Schema $schema)
 {
     $table = $schema->createTable(static::ORO_B2B_CUSTOMER_TABLE_NAME);
     $table->addColumn('id', 'integer', ['autoincrement' => true]);
     $table->addColumn('name', 'string', ['length' => 255]);
     $table->addColumn('parent_id', 'integer', ['notnull' => false]);
     $table->addColumn('group_id', 'integer', ['notnull' => false]);
     $table->addColumn('organization_id', 'integer', ['notnull' => false]);
     $table->setPrimaryKey(['id']);
     $table->addIndex(['name'], 'orob2b_customer_name_idx', []);
     $this->attachmentExtension->addAttachmentAssociation($schema, static::ORO_B2B_CUSTOMER_TABLE_NAME, ['image/*', 'application/pdf', 'application/zip', 'application/x-gzip', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation']);
     $this->noteExtension->addNoteAssociation($schema, static::ORO_B2B_CUSTOMER_TABLE_NAME);
     $this->extendExtension->addEnumField($schema, static::ORO_B2B_CUSTOMER_TABLE_NAME, 'internal_rating', Customer::INTERNAL_RATING_CODE);
 }
Example #11
0
 /**
  * Enable notes for Account entity
  *
  * @param Schema        $schema
  * @param NoteExtension $noteExtension
  */
 public static function addNoteAssociations(Schema $schema, NoteExtension $noteExtension)
 {
     $noteExtension->addNoteAssociation($schema, 'orocrm_contact');
 }
 /**
  * Enable notes for RFP entity
  *
  * @param Schema        $schema
  * @param NoteExtension $noteExtension
  */
 protected function addNoteAssociations(Schema $schema, NoteExtension $noteExtension)
 {
     $noteExtension->addNoteAssociation($schema, 'orob2b_rfp_request');
 }
 /**
  * Enable notes for Order entity
  *
  * @param Schema $schema
  */
 public function addNoteAssociations(Schema $schema)
 {
     $this->noteExtension->addNoteAssociation($schema, self::ORDER_TABLE_NAME);
 }
Example #14
0
 /**
  * Enable notes for Lead and Opportunity entities
  *
  * @param Schema        $schema
  * @param NoteExtension $noteExtension
  */
 public static function addNoteAssociations(Schema $schema, NoteExtension $noteExtension)
 {
     $noteExtension->addNoteAssociation($schema, 'orocrm_sales_lead');
     $noteExtension->addNoteAssociation($schema, 'orocrm_sales_opportunity');
 }
 /**
  * Enable notes for Quote entity
  *
  * @param Schema $schema
  * @param NoteExtension $noteExtension
  */
 protected function addNoteAssociations(Schema $schema, NoteExtension $noteExtension)
 {
     $noteExtension->addNoteAssociation($schema, 'orob2b_sale_quote');
 }
 /**
  * Enable notes for PaymentTerm entity
  *
  * @param Schema $schema
  */
 protected function addNoteAssociations(Schema $schema)
 {
     $this->noteExtension->addNoteAssociation($schema, self::TABLE_NAME);
 }
 /**
  * Enable notes for Magento Order entity
  *
  * @param Schema        $schema
  * @param NoteExtension $noteExtension
  */
 public static function addNoteAssociations(Schema $schema, NoteExtension $noteExtension)
 {
     $noteExtension->addNoteAssociation($schema, 'orocrm_magento_order');
 }