| @@ 196-204 (lines=9) @@ | ||
| 193 | *  | 
                                |
| 194 | * @param Schema $schema  | 
                                |
| 195 | */  | 
                                |
| 196 | protected function createOrocrmContactAdrToAdrTypeTable(Schema $schema)  | 
                                |
| 197 |     { | 
                                |
| 198 |         $table = $schema->createTable('orocrm_contact_adr_to_adr_type'); | 
                                |
| 199 |         $table->addColumn('contact_address_id', 'integer', []); | 
                                |
| 200 |         $table->addColumn('type_name', 'string', ['length' => 16]); | 
                                |
| 201 | $table->setPrimaryKey(['contact_address_id', 'type_name']);  | 
                                |
| 202 | $table->addIndex(['contact_address_id'], 'IDX_3FBCDDC6320EF6E2', []);  | 
                                |
| 203 | $table->addIndex(['type_name'], 'IDX_3FBCDDC6892CBB0E', []);  | 
                                |
| 204 | }  | 
                                |
| 205 | ||
| 206 | /**  | 
                                |
| 207 | * Create orocrm_contact_email table  | 
                                |
| @@ 290-298 (lines=9) @@ | ||
| 287 | *  | 
                                |
| 288 | * @param Schema $schema  | 
                                |
| 289 | */  | 
                                |
| 290 | protected function createOrocrmContactToContactGrpTable(Schema $schema)  | 
                                |
| 291 |     { | 
                                |
| 292 |         $table = $schema->createTable('orocrm_contact_to_contact_grp'); | 
                                |
| 293 |         $table->addColumn('contact_id', 'integer', []); | 
                                |
| 294 |         $table->addColumn('contact_group_id', 'integer', []); | 
                                |
| 295 | $table->setPrimaryKey(['contact_id', 'contact_group_id']);  | 
                                |
| 296 | $table->addIndex(['contact_id'], 'IDX_885CCB12E7A1254A', []);  | 
                                |
| 297 | $table->addIndex(['contact_group_id'], 'IDX_885CCB12647145D0', []);  | 
                                |
| 298 | }  | 
                                |
| 299 | ||
| 300 | /**  | 
                                |
| 301 | * Add orocrm_contact foreign keys.  | 
                                |
| @@ 123-133 (lines=11) @@ | ||
| 120 | * @param Schema $schema  | 
                                |
| 121 | * @param string $tableName  | 
                                |
| 122 | */  | 
                                |
| 123 | public static function orocrmContactAddressToAddressTypeTable(Schema $schema, $tableName = null)  | 
                                |
| 124 |     { | 
                                |
| 125 | /** Generate table orocrm_contact_address_to_address_type **/  | 
                                |
| 126 | $table = $schema->createTable($tableName ?: 'orocrm_contact_address_to_address_type');  | 
                                |
| 127 |         $table->addColumn('contact_address_id', 'integer', []); | 
                                |
| 128 |         $table->addColumn('type_name', 'string', ['length' => 16]); | 
                                |
| 129 | $table->setPrimaryKey(['contact_address_id', 'type_name']);  | 
                                |
| 130 | $table->addIndex(['contact_address_id'], 'IDX_3FBCDDC6320EF6E2', []);  | 
                                |
| 131 | $table->addIndex(['type_name'], 'IDX_3FBCDDC6892CBB0E', []);  | 
                                |
| 132 | /** End of generate table orocrm_contact_address_to_address_type **/  | 
                                |
| 133 | }  | 
                                |
| 134 | ||
| 135 | /**  | 
                                |
| 136 | * Generate table orocrm_contact_email  | 
                                |
| @@ 229-239 (lines=11) @@ | ||
| 226 | * @param Schema $schema  | 
                                |
| 227 | * @param string $tableName  | 
                                |
| 228 | */  | 
                                |
| 229 | public static function orocrmContactToContactGroupTable(Schema $schema, $tableName = null)  | 
                                |
| 230 |     { | 
                                |
| 231 | /** Generate table orocrm_contact_to_contact_group **/  | 
                                |
| 232 | $table = $schema->createTable($tableName ?: 'orocrm_contact_to_contact_group');  | 
                                |
| 233 |         $table->addColumn('contact_id', 'integer', []); | 
                                |
| 234 |         $table->addColumn('contact_group_id', 'smallint', []); | 
                                |
| 235 | $table->setPrimaryKey(['contact_id', 'contact_group_id']);  | 
                                |
| 236 | $table->addIndex(['contact_id'], 'IDX_885CCB12E7A1254A', []);  | 
                                |
| 237 | $table->addIndex(['contact_group_id'], 'IDX_885CCB12647145D0', []);  | 
                                |
| 238 | /** End of generate table orocrm_contact_to_contact_group **/  | 
                                |
| 239 | }  | 
                                |
| 240 | ||
| 241 | /**  | 
                                |
| 242 | * Generate foreign keys for table orocrm_contact  | 
                                |
| @@ 78-86 (lines=9) @@ | ||
| 75 | *  | 
                                |
| 76 | * @param Schema $schema  | 
                                |
| 77 | */  | 
                                |
| 78 | protected function createOrocrmContactusReqEmailsTable(Schema $schema)  | 
                                |
| 79 |     { | 
                                |
| 80 |         $table = $schema->createTable('orocrm_contactus_req_emails'); | 
                                |
| 81 |         $table->addColumn('request_id', 'integer', []); | 
                                |
| 82 |         $table->addColumn('email_id', 'integer', []); | 
                                |
| 83 | $table->setPrimaryKey(['request_id', 'email_id']);  | 
                                |
| 84 | $table->addIndex(['request_id'], 'IDX_E494F7AE427EB8A5', []);  | 
                                |
| 85 | $table->addIndex(['email_id'], 'IDX_E494F7AEA832C1C9', []);  | 
                                |
| 86 | }  | 
                                |
| 87 | ||
| 88 | /**  | 
                                |
| 89 | * Create orocrm_contactus_request table  | 
                                |
| @@ 83-93 (lines=11) @@ | ||
| 80 | *  | 
                                |
| 81 | * @param Schema $schema  | 
                                |
| 82 | */  | 
                                |
| 83 | public static function orocrmContactusRequestCallsTable(Schema $schema)  | 
                                |
| 84 |     { | 
                                |
| 85 | /** Generate table orocrm_contactus_request_calls **/  | 
                                |
| 86 |         $table = $schema->createTable('orocrm_contactus_request_calls'); | 
                                |
| 87 |         $table->addColumn('request_id', 'integer', []); | 
                                |
| 88 |         $table->addColumn('call_id', 'integer', []); | 
                                |
| 89 | $table->setPrimaryKey(['request_id', 'call_id']);  | 
                                |
| 90 | $table->addIndex(['request_id'], 'IDX_6F7A50CE427EB8A5', []);  | 
                                |
| 91 | $table->addIndex(['call_id'], 'IDX_6F7A50CE50A89B2C', []);  | 
                                |
| 92 | /** End of generate table orocrm_contactus_request_calls **/  | 
                                |
| 93 | }  | 
                                |
| 94 | ||
| 95 | /**  | 
                                |
| 96 | * Generate table orocrm_contactus_request_emails  | 
                                |
| @@ 101-111 (lines=11) @@ | ||
| 98 | * @param Schema $schema  | 
                                |
| 99 | * @param string $tableName  | 
                                |
| 100 | */  | 
                                |
| 101 | public static function orocrmContactusRequestEmailsTable(Schema $schema, $tableName = null)  | 
                                |
| 102 |     { | 
                                |
| 103 | /** Generate table orocrm_contactus_request_emails **/  | 
                                |
| 104 | $table = $schema->createTable($tableName ?: 'orocrm_contactus_request_emails');  | 
                                |
| 105 |         $table->addColumn('request_id', 'integer', []); | 
                                |
| 106 |         $table->addColumn('email_id', 'integer', []); | 
                                |
| 107 | $table->setPrimaryKey(['request_id', 'email_id']);  | 
                                |
| 108 | $table->addIndex(['request_id'], 'IDX_4DEF4058427EB8A5', []);  | 
                                |
| 109 | $table->addIndex(['email_id'], 'IDX_4DEF4058A832C1C9', []);  | 
                                |
| 110 | /** End of generate table orocrm_contactus_request_emails **/  | 
                                |
| 111 | }  | 
                                |
| 112 | ||
| 113 | /**  | 
                                |
| 114 | * Generate foreign keys for table orocrm_contactus_request  | 
                                |
| @@ 168-178 (lines=11) @@ | ||
| 165 | *  | 
                                |
| 166 | * @param Schema $schema  | 
                                |
| 167 | */  | 
                                |
| 168 | public static function orocrmMagentoCartCallsTable(Schema $schema)  | 
                                |
| 169 |     { | 
                                |
| 170 | /** Generate table orocrm_magento_cart_calls **/  | 
                                |
| 171 |         $table = $schema->createTable('orocrm_magento_cart_calls'); | 
                                |
| 172 |         $table->addColumn('cart_id', 'integer', []); | 
                                |
| 173 |         $table->addColumn('call_id', 'integer', []); | 
                                |
| 174 | $table->setPrimaryKey(['cart_id', 'call_id']);  | 
                                |
| 175 | $table->addIndex(['cart_id'], 'IDX_83A847751AD5CDBF', []);  | 
                                |
| 176 | $table->addIndex(['call_id'], 'IDX_83A8477550A89B2C', []);  | 
                                |
| 177 | /** End of generate table orocrm_magento_cart_calls **/  | 
                                |
| 178 | }  | 
                                |
| 179 | ||
| 180 | /**  | 
                                |
| 181 | * Generate table orocrm_magento_cart_emails  | 
                                |
| @@ 185-195 (lines=11) @@ | ||
| 182 | *  | 
                                |
| 183 | * @param Schema $schema  | 
                                |
| 184 | */  | 
                                |
| 185 | public static function orocrmMagentoCartEmailsTable(Schema $schema)  | 
                                |
| 186 |     { | 
                                |
| 187 | /** Generate table orocrm_magento_cart_emails **/  | 
                                |
| 188 |         $table = $schema->createTable('orocrm_magento_cart_emails'); | 
                                |
| 189 |         $table->addColumn('cart_id', 'integer', []); | 
                                |
| 190 |         $table->addColumn('email_id', 'integer', []); | 
                                |
| 191 | $table->setPrimaryKey(['cart_id', 'email_id']);  | 
                                |
| 192 | $table->addIndex(['cart_id'], 'IDX_11B0F84B1AD5CDBF', []);  | 
                                |
| 193 | $table->addIndex(['email_id'], 'IDX_11B0F84BA832C1C9', []);  | 
                                |
| 194 | /** End of generate table orocrm_magento_cart_emails **/  | 
                                |
| 195 | }  | 
                                |
| 196 | ||
| 197 | /**  | 
                                |
| 198 | * Generate table orocrm_magento_cart_item  | 
                                |
| @@ 336-346 (lines=11) @@ | ||
| 333 | * @param Schema $schema  | 
                                |
| 334 | * @param string $tableName  | 
                                |
| 335 | */  | 
                                |
| 336 | public static function orocrmMagentoCustomerAddressToAddressTypeTable(Schema $schema, $tableName = null)  | 
                                |
| 337 |     { | 
                                |
| 338 | /** Generate table orocrm_magento_customer_address_to_address_type **/  | 
                                |
| 339 | $table = $schema->createTable($tableName ?: 'orocrm_magento_customer_address_to_address_type');  | 
                                |
| 340 |         $table->addColumn('customer_address_id', 'integer', []); | 
                                |
| 341 |         $table->addColumn('type_name', 'string', ['length' => 16]); | 
                                |
| 342 | $table->setPrimaryKey(['customer_address_id', 'type_name']);  | 
                                |
| 343 | $table->addIndex(['customer_address_id'], 'IDX_65B2C97487EABF7', []);  | 
                                |
| 344 | $table->addIndex(['type_name'], 'IDX_65B2C974892CBB0E', []);  | 
                                |
| 345 | /** End of generate table orocrm_magento_customer_address_to_address_type **/  | 
                                |
| 346 | }  | 
                                |
| 347 | ||
| 348 | /**  | 
                                |
| 349 | * Generate table orocrm_magento_customer_group  | 
                                |
| @@ 452-462 (lines=11) @@ | ||
| 449 | *  | 
                                |
| 450 | * @param Schema $schema  | 
                                |
| 451 | */  | 
                                |
| 452 | public static function orocrmMagentoOrderAddrTypeTable(Schema $schema)  | 
                                |
| 453 |     { | 
                                |
| 454 | /** Generate table orocrm_magento_order_addr_type **/  | 
                                |
| 455 |         $table = $schema->createTable('orocrm_magento_order_addr_type'); | 
                                |
| 456 |         $table->addColumn('order_address_id', 'integer', []); | 
                                |
| 457 |         $table->addColumn('type_name', 'string', ['length' => 16]); | 
                                |
| 458 | $table->setPrimaryKey(['order_address_id', 'type_name']);  | 
                                |
| 459 | $table->addIndex(['order_address_id'], 'IDX_7B667960466D5220', []);  | 
                                |
| 460 | $table->addIndex(['type_name'], 'IDX_7B667960892CBB0E', []);  | 
                                |
| 461 | /** End of generate table orocrm_magento_order_addr_type **/  | 
                                |
| 462 | }  | 
                                |
| 463 | ||
| 464 | /**  | 
                                |
| 465 | * Generate table orocrm_magento_order_calls  | 
                                |
| @@ 469-479 (lines=11) @@ | ||
| 466 | *  | 
                                |
| 467 | * @param Schema $schema  | 
                                |
| 468 | */  | 
                                |
| 469 | public static function orocrmMagentoOrderCallsTable(Schema $schema)  | 
                                |
| 470 |     { | 
                                |
| 471 | /** Generate table orocrm_magento_order_calls **/  | 
                                |
| 472 |         $table = $schema->createTable('orocrm_magento_order_calls'); | 
                                |
| 473 |         $table->addColumn('order_id', 'integer', []); | 
                                |
| 474 |         $table->addColumn('call_id', 'integer', []); | 
                                |
| 475 | $table->setPrimaryKey(['order_id', 'call_id']);  | 
                                |
| 476 | $table->addIndex(['order_id'], 'IDX_A885A348D9F6D38', []);  | 
                                |
| 477 | $table->addIndex(['call_id'], 'IDX_A885A3450A89B2C', []);  | 
                                |
| 478 | /** End of generate table orocrm_magento_order_calls **/  | 
                                |
| 479 | }  | 
                                |
| 480 | ||
| 481 | /**  | 
                                |
| 482 | * Generate table orocrm_magento_order_emails  | 
                                |
| @@ 486-496 (lines=11) @@ | ||
| 483 | *  | 
                                |
| 484 | * @param Schema $schema  | 
                                |
| 485 | */  | 
                                |
| 486 | public static function orocrmMagentoOrderEmailsTable(Schema $schema)  | 
                                |
| 487 |     { | 
                                |
| 488 | /** Generate table orocrm_magento_order_emails **/  | 
                                |
| 489 |         $table = $schema->createTable('orocrm_magento_order_emails'); | 
                                |
| 490 |         $table->addColumn('order_id', 'integer', []); | 
                                |
| 491 |         $table->addColumn('email_id', 'integer', []); | 
                                |
| 492 | $table->setPrimaryKey(['order_id', 'email_id']);  | 
                                |
| 493 | $table->addIndex(['order_id'], 'IDX_10E2A9508D9F6D38', []);  | 
                                |
| 494 | $table->addIndex(['email_id'], 'IDX_10E2A950A832C1C9', []);  | 
                                |
| 495 | /** End of generate table orocrm_magento_order_emails **/  | 
                                |
| 496 | }  | 
                                |
| 497 | ||
| 498 | /**  | 
                                |
| 499 | * Generate table orocrm_magento_order_items  | 
                                |
| @@ 561-571 (lines=11) @@ | ||
| 558 | * @param Schema $schema  | 
                                |
| 559 | * @param string $tableName  | 
                                |
| 560 | */  | 
                                |
| 561 | public static function orocrmMagentoProductToWebsiteTable(Schema $schema, $tableName = null)  | 
                                |
| 562 |     { | 
                                |
| 563 | /** Generate table orocrm_magento_product_to_website **/  | 
                                |
| 564 | $table = $schema->createTable($tableName ?: 'orocrm_magento_product_to_website');  | 
                                |
| 565 |         $table->addColumn('product_id', 'integer', []); | 
                                |
| 566 |         $table->addColumn('website_id', 'integer', []); | 
                                |
| 567 | $table->setPrimaryKey(['product_id', 'website_id']);  | 
                                |
| 568 | $table->addIndex(['product_id'], 'IDX_3A3EF4984584665A', []);  | 
                                |
| 569 | $table->addIndex(['website_id'], 'IDX_3A3EF49818F45C82', []);  | 
                                |
| 570 | /** End of generate table orocrm_magento_product_to_website **/  | 
                                |
| 571 | }  | 
                                |
| 572 | ||
| 573 | /**  | 
                                |
| 574 | * Generate table orocrm_magento_region  | 
                                |
| @@ 346-354 (lines=9) @@ | ||
| 343 | *  | 
                                |
| 344 | * @param Schema $schema  | 
                                |
| 345 | */  | 
                                |
| 346 | protected function createOrocrmMagentoOrderEmailsTable(Schema $schema)  | 
                                |
| 347 |     { | 
                                |
| 348 |         $table = $schema->createTable('orocrm_magento_order_emails'); | 
                                |
| 349 |         $table->addColumn('order_id', 'integer', []); | 
                                |
| 350 |         $table->addColumn('email_id', 'integer', []); | 
                                |
| 351 | $table->addIndex(['order_id'], 'IDX_10E2A9508D9F6D38', []);  | 
                                |
| 352 | $table->addIndex(['email_id'], 'IDX_10E2A950A832C1C9', []);  | 
                                |
| 353 | $table->setPrimaryKey(['order_id', 'email_id']);  | 
                                |
| 354 | }  | 
                                |
| 355 | ||
| 356 | /**  | 
                                |
| 357 | * Create orocrm_magento_customer_group table  | 
                                |
| @@ 529-537 (lines=9) @@ | ||
| 526 | *  | 
                                |
| 527 | * @param Schema $schema  | 
                                |
| 528 | */  | 
                                |
| 529 | protected function createOrocrmMagentoCustAddrTypeTable(Schema $schema)  | 
                                |
| 530 |     { | 
                                |
| 531 |         $table = $schema->createTable('orocrm_magento_cust_addr_type'); | 
                                |
| 532 |         $table->addColumn('customer_address_id', 'integer', []); | 
                                |
| 533 |         $table->addColumn('type_name', 'string', ['length' => 16]); | 
                                |
| 534 | $table->addIndex(['customer_address_id'], 'IDX_308A31F187EABF7', []);  | 
                                |
| 535 | $table->addIndex(['type_name'], 'IDX_308A31F1892CBB0E', []);  | 
                                |
| 536 | $table->setPrimaryKey(['customer_address_id', 'type_name']);  | 
                                |
| 537 | }  | 
                                |
| 538 | ||
| 539 | /**  | 
                                |
| 540 | * Create orocrm_magento_order_address table  | 
                                |
| @@ 573-581 (lines=9) @@ | ||
| 570 | *  | 
                                |
| 571 | * @param Schema $schema  | 
                                |
| 572 | */  | 
                                |
| 573 | protected function createOrocrmMagentoOrderAddrTypeTable(Schema $schema)  | 
                                |
| 574 |     { | 
                                |
| 575 |         $table = $schema->createTable('orocrm_magento_order_addr_type'); | 
                                |
| 576 |         $table->addColumn('order_address_id', 'integer', []); | 
                                |
| 577 |         $table->addColumn('type_name', 'string', ['length' => 16]); | 
                                |
| 578 | $table->addIndex(['order_address_id'], 'IDX_E927A18F466D5220', []);  | 
                                |
| 579 | $table->addIndex(['type_name'], 'IDX_E927A18F892CBB0E', []);  | 
                                |
| 580 | $table->setPrimaryKey(['order_address_id', 'type_name']);  | 
                                |
| 581 | }  | 
                                |
| 582 | ||
| 583 | /**  | 
                                |
| 584 | * Create orocrm_magento_product table  | 
                                |
| @@ 615-623 (lines=9) @@ | ||
| 612 | *  | 
                                |
| 613 | * @param Schema $schema  | 
                                |
| 614 | */  | 
                                |
| 615 | protected function createOrocrmMagentoProdToWebsiteTable(Schema $schema)  | 
                                |
| 616 |     { | 
                                |
| 617 |         $table = $schema->createTable('orocrm_magento_prod_to_website'); | 
                                |
| 618 |         $table->addColumn('product_id', 'integer', []); | 
                                |
| 619 |         $table->addColumn('website_id', 'integer', []); | 
                                |
| 620 | $table->addIndex(['product_id'], 'IDX_9BB836554584665A', []);  | 
                                |
| 621 | $table->addIndex(['website_id'], 'IDX_9BB8365518F45C82', []);  | 
                                |
| 622 | $table->setPrimaryKey(['product_id', 'website_id']);  | 
                                |
| 623 | }  | 
                                |
| 624 | ||
| 625 | /**  | 
                                |
| 626 | * Create orocrm_magento_website table  | 
                                |
| @@ 720-728 (lines=9) @@ | ||
| 717 | *  | 
                                |
| 718 | * @param Schema $schema  | 
                                |
| 719 | */  | 
                                |
| 720 | protected function createOrocrmMagentoCartEmailsTable(Schema $schema)  | 
                                |
| 721 |     { | 
                                |
| 722 |         $table = $schema->createTable('orocrm_magento_cart_emails'); | 
                                |
| 723 |         $table->addColumn('cart_id', 'integer', []); | 
                                |
| 724 |         $table->addColumn('email_id', 'integer', []); | 
                                |
| 725 | $table->addIndex(['cart_id'], 'IDX_11B0F84B1AD5CDBF', []);  | 
                                |
| 726 | $table->addIndex(['email_id'], 'IDX_11B0F84BA832C1C9', []);  | 
                                |
| 727 | $table->setPrimaryKey(['cart_id', 'email_id']);  | 
                                |
| 728 | }  | 
                                |
| 729 | ||
| 730 | /**  | 
                                |
| 731 | * Create orocrm_magento_store table  | 
                                |
| @@ 170-178 (lines=9) @@ | ||
| 167 | *  | 
                                |
| 168 | * @param Schema $schema  | 
                                |
| 169 | */  | 
                                |
| 170 | protected function createOrocrmAccountToContactTable(Schema $schema)  | 
                                |
| 171 |     { | 
                                |
| 172 |         $table = $schema->createTable('orocrm_account_to_contact'); | 
                                |
| 173 |         $table->addColumn('account_id', 'integer', []); | 
                                |
| 174 |         $table->addColumn('contact_id', 'integer', []); | 
                                |
| 175 | $table->setPrimaryKey(['account_id', 'contact_id']);  | 
                                |
| 176 | $table->addIndex(['account_id'], 'IDX_65B8FBEC9B6B5FBA', []);  | 
                                |
| 177 | $table->addIndex(['contact_id'], 'IDX_65B8FBECE7A1254A', []);  | 
                                |
| 178 | }  | 
                                |
| 179 | ||
| 180 | /**  | 
                                |
| 181 | * Add orocrm_account foreign keys.  | 
                                |